repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/Skeleton.java
// Path: src/main/java/tutorial/storm/trident/testutil/TestUtils.java // public class TestUtils { // public static TransactionalTridentKafkaSpout testTweetSpout(BrokerHosts hosts) { // TridentKafkaConfig kafkaConfig = new TridentKafkaConfig(hosts, "test", "storm"); // kafkaConfig.scheme = new Scheme...
import backtype.storm.Config; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import storm.kafka.*; import storm.kafka.trident.TransactionalT...
package tutorial.storm.trident; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class Skeleton { private static final Logger log = LoggerFactory.getLogger(Skeleton.class); public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTop...
// Path: src/main/java/tutorial/storm/trident/testutil/TestUtils.java // public class TestUtils { // public static TransactionalTridentKafkaSpout testTweetSpout(BrokerHosts hosts) { // TridentKafkaConfig kafkaConfig = new TridentKafkaConfig(hosts, "test", "storm"); // kafkaConfig.scheme = new Scheme...
TransactionalTridentKafkaSpout kafkaSpout = TestUtils.testTweetSpout(hosts);
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagFollowerCountGrouping.java
// Path: src/main/java/tutorial/storm/trident/state/HazelCastStateFactory.java // public class HazelCastStateFactory<T> implements StateFactory { // // // @Override // public MapState<T> makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) { // IBackingMap im = new Hazel...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import com.google.common.base.Preconditions; import...
package tutorial.storm.trident.example; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class TopHashtagFollowerCountGrouping { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); ...
// Path: src/main/java/tutorial/storm/trident/state/HazelCastStateFactory.java // public class HazelCastStateFactory<T> implements StateFactory { // // // @Override // public MapState<T> makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) { // IBackingMap im = new Hazel...
.persistentAggregate(new HazelCastStateFactory(), new Count(), new Fields("count"))
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagFollowerCountGrouping.java
// Path: src/main/java/tutorial/storm/trident/state/HazelCastStateFactory.java // public class HazelCastStateFactory<T> implements StateFactory { // // // @Override // public MapState<T> makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) { // IBackingMap im = new Hazel...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import com.google.common.base.Preconditions; import...
package tutorial.storm.trident.example; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class TopHashtagFollowerCountGrouping { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); ...
// Path: src/main/java/tutorial/storm/trident/state/HazelCastStateFactory.java // public class HazelCastStateFactory<T> implements StateFactory { // // // @Override // public MapState<T> makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) { // IBackingMap im = new Hazel...
TransactionalTridentKafkaSpout kafkaSpout = TestUtils.testTweetSpout(hosts);
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/JoinExample.java
// Path: src/main/java/tutorial/storm/trident/testutil/TestUtils.java // public class TestUtils { // public static TransactionalTridentKafkaSpout testTweetSpout(BrokerHosts hosts) { // TridentKafkaConfig kafkaConfig = new TridentKafkaConfig(hosts, "test", "storm"); // kafkaConfig.scheme = new Scheme...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import com.google.common.base.Preconditions; import com.google.common.collect.Immuta...
package tutorial.storm.trident.example; /** * This is a really simple example on how do joins between streams with Trident. * * @author Davide Palmisano (davide.palmisano@peerindex.com) */ public class JoinExample { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) thro...
// Path: src/main/java/tutorial/storm/trident/testutil/TestUtils.java // public class TestUtils { // public static TransactionalTridentKafkaSpout testTweetSpout(BrokerHosts hosts) { // TridentKafkaConfig kafkaConfig = new TridentKafkaConfig(hosts, "test", "storm"); // kafkaConfig.scheme = new Scheme...
TransactionalTridentKafkaSpout kafkaSpout = TestUtils.testTweetSpout(hosts);
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/ClusterTestTopology.java
// Path: src/main/java/tutorial/storm/trident/testutil/FakeTweetsBatchSpout.java // @SuppressWarnings({"serial", "rawtypes"}) // public class FakeTweetsBatchSpout implements IBatchSpout { // private static final AtomicInteger seq = new AtomicInteger(); // // private int batchSize; // private FakeTweetGener...
import backtype.storm.Config; import backtype.storm.StormSubmitter; import backtype.storm.tuple.Fields; import storm.trident.TridentState; import storm.trident.TridentTopology; import storm.trident.operation.builtin.Count; import storm.trident.operation.builtin.MapGet; import storm.trident.testing.MemoryMapState; impor...
package tutorial.storm.trident; /** * Silly test topology to test the cluster * * @author Enno Shioji (eshioji@gmail.com) */ public class ClusterTestTopology { public static void main(String[] args) throws Exception { Config conf = new Config(); // Submits the topology String topology...
// Path: src/main/java/tutorial/storm/trident/testutil/FakeTweetsBatchSpout.java // @SuppressWarnings({"serial", "rawtypes"}) // public class FakeTweetsBatchSpout implements IBatchSpout { // private static final AtomicInteger seq = new AtomicInteger(); // // private int batchSize; // private FakeTweetGener...
FakeTweetsBatchSpout fakeTweets = new FakeTweetsBatchSpout(10);
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/Part04_BasicStateAndDRPC.java
// Path: src/main/java/tutorial/storm/trident/operations/Split.java // public class Split extends BaseFunction { // private final String on; // private Splitter splitter; // // public Split(String on) { // this.on = on; // } // // @Override // public void execute(TridentTuple tuple, Tr...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.generated.StormTopology; import backtype.storm.tuple.Fields; import com.google.common.collect.ImmutableList; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import storm.trident.TridentState...
package tutorial.storm.trident; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class Part04_BasicStateAndDRPC { private static final Logger log = LoggerFactory.getLogger(Part04_BasicStateAndDRPC.class); public static void main(String[] args) throws Exception{
// Path: src/main/java/tutorial/storm/trident/operations/Split.java // public class Split extends BaseFunction { // private final String on; // private Splitter splitter; // // public Split(String on) { // this.on = on; // } // // @Override // public void execute(TridentTuple tuple, Tr...
FakeTweetGenerator fakeTweets = new FakeTweetGenerator();
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagByCountry.java
// Path: src/main/java/tutorial/storm/trident/operations/ExtractLocation.java // public class ExtractLocation extends BaseFunction { // // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Status status = (Status) tuple.get(0); // Content content = (Content) ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import com.google.common.base.Preconditions; import...
package tutorial.storm.trident.example; /** * */ public class TopHashtagByCountry { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); TridentState count = topology .newSt...
// Path: src/main/java/tutorial/storm/trident/operations/ExtractLocation.java // public class ExtractLocation extends BaseFunction { // // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Status status = (Status) tuple.get(0); // Content content = (Content) ...
.each(new Fields("str"), new ParseTweet(), new Fields("status", "content", "user"))
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagByCountry.java
// Path: src/main/java/tutorial/storm/trident/operations/ExtractLocation.java // public class ExtractLocation extends BaseFunction { // // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Status status = (Status) tuple.get(0); // Content content = (Content) ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import com.google.common.base.Preconditions; import...
package tutorial.storm.trident.example; /** * */ public class TopHashtagByCountry { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); TridentState count = topology .newSt...
// Path: src/main/java/tutorial/storm/trident/operations/ExtractLocation.java // public class ExtractLocation extends BaseFunction { // // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Status status = (Status) tuple.get(0); // Content content = (Content) ...
.each(new Fields("content"), new OnlyHashtags())
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagByCountry.java
// Path: src/main/java/tutorial/storm/trident/operations/ExtractLocation.java // public class ExtractLocation extends BaseFunction { // // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Status status = (Status) tuple.get(0); // Content content = (Content) ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import com.google.common.base.Preconditions; import...
package tutorial.storm.trident.example; /** * */ public class TopHashtagByCountry { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); TridentState count = topology .newSt...
// Path: src/main/java/tutorial/storm/trident/operations/ExtractLocation.java // public class ExtractLocation extends BaseFunction { // // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Status status = (Status) tuple.get(0); // Content content = (Content) ...
.each(new Fields("status"), new OnlyGeo())
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagByCountry.java
// Path: src/main/java/tutorial/storm/trident/operations/ExtractLocation.java // public class ExtractLocation extends BaseFunction { // // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Status status = (Status) tuple.get(0); // Content content = (Content) ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import com.google.common.base.Preconditions; import...
package tutorial.storm.trident.example; /** * */ public class TopHashtagByCountry { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); TridentState count = topology .newSt...
// Path: src/main/java/tutorial/storm/trident/operations/ExtractLocation.java // public class ExtractLocation extends BaseFunction { // // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Status status = (Status) tuple.get(0); // Content content = (Content) ...
.each(new Fields("status", "content"), new ExtractLocation(), new Fields("country", "contentName"))
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagByCountry.java
// Path: src/main/java/tutorial/storm/trident/operations/ExtractLocation.java // public class ExtractLocation extends BaseFunction { // // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Status status = (Status) tuple.get(0); // Content content = (Content) ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import com.google.common.base.Preconditions; import...
package tutorial.storm.trident.example; /** * */ public class TopHashtagByCountry { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); TridentState count = topology .newSt...
// Path: src/main/java/tutorial/storm/trident/operations/ExtractLocation.java // public class ExtractLocation extends BaseFunction { // // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Status status = (Status) tuple.get(0); // Content content = (Content) ...
TransactionalTridentKafkaSpout kafkaSpout = TestUtils.testTweetSpout(hosts);
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/operations/OnlyHashtags.java
// Path: src/main/java/tutorial/storm/trident/testutil/Content.java // public class Content { // private static final Logger log = LoggerFactory.getLogger(Content.class); // // private long tweetId; // private long userId; // private long createdAtMs; // // private String contentName; // priva...
import storm.trident.operation.BaseFilter; import storm.trident.tuple.TridentTuple; import tutorial.storm.trident.testutil.Content;
package tutorial.storm.trident.operations; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class OnlyHashtags extends BaseFilter { @Override public boolean isKeep(TridentTuple tuple) {
// Path: src/main/java/tutorial/storm/trident/testutil/Content.java // public class Content { // private static final Logger log = LoggerFactory.getLogger(Content.class); // // private long tweetId; // private long userId; // private long createdAtMs; // // private String contentName; // priva...
Content content = (Content)tuple.get(0);
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/operations/GetContentName.java
// Path: src/main/java/tutorial/storm/trident/testutil/Content.java // public class Content { // private static final Logger log = LoggerFactory.getLogger(Content.class); // // private long tweetId; // private long userId; // private long createdAtMs; // // private String contentName; // priva...
import backtype.storm.tuple.Values; import storm.trident.operation.BaseFunction; import storm.trident.operation.TridentCollector; import storm.trident.tuple.TridentTuple; import tutorial.storm.trident.testutil.Content;
package tutorial.storm.trident.operations; /** * @author Davide Palmisano (davide.palmisano@peerindex.com) */ public class GetContentName extends BaseFunction { @Override public void execute(TridentTuple objects, TridentCollector tridentCollector) {
// Path: src/main/java/tutorial/storm/trident/testutil/Content.java // public class Content { // private static final Logger log = LoggerFactory.getLogger(Content.class); // // private long tweetId; // private long userId; // private long createdAtMs; // // private String contentName; // priva...
Content content = (Content) objects.getValueByField("content");
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagByFollowerClass.java
// Path: src/main/java/tutorial/storm/trident/operations/ExtractFollowerClassAndContentName.java // public class ExtractFollowerClassAndContentName extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Content content = (Content)tuple.get(0); // ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import backtype.storm.tuple.Values; import com.goog...
package tutorial.storm.trident.example; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class TopHashtagByFollowerClass { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); Triden...
// Path: src/main/java/tutorial/storm/trident/operations/ExtractFollowerClassAndContentName.java // public class ExtractFollowerClassAndContentName extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Content content = (Content)tuple.get(0); // ...
.each(new Fields("str"), new ParseTweet(), new Fields("text", "content", "user"))
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagByFollowerClass.java
// Path: src/main/java/tutorial/storm/trident/operations/ExtractFollowerClassAndContentName.java // public class ExtractFollowerClassAndContentName extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Content content = (Content)tuple.get(0); // ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import backtype.storm.tuple.Values; import com.goog...
package tutorial.storm.trident.example; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class TopHashtagByFollowerClass { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); Triden...
// Path: src/main/java/tutorial/storm/trident/operations/ExtractFollowerClassAndContentName.java // public class ExtractFollowerClassAndContentName extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Content content = (Content)tuple.get(0); // ...
.each(new Fields("content"), new OnlyHashtags())
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagByFollowerClass.java
// Path: src/main/java/tutorial/storm/trident/operations/ExtractFollowerClassAndContentName.java // public class ExtractFollowerClassAndContentName extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Content content = (Content)tuple.get(0); // ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import backtype.storm.tuple.Values; import com.goog...
package tutorial.storm.trident.example; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class TopHashtagByFollowerClass { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); Triden...
// Path: src/main/java/tutorial/storm/trident/operations/ExtractFollowerClassAndContentName.java // public class ExtractFollowerClassAndContentName extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Content content = (Content)tuple.get(0); // ...
.each(new Fields("user"), new OnlyEnglish())
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/TopHashtagByFollowerClass.java
// Path: src/main/java/tutorial/storm/trident/operations/ExtractFollowerClassAndContentName.java // public class ExtractFollowerClassAndContentName extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Content content = (Content)tuple.get(0); // ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import backtype.storm.tuple.Values; import com.goog...
package tutorial.storm.trident.example; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class TopHashtagByFollowerClass { public static StormTopology buildTopology(TransactionalTridentKafkaSpout spout) throws IOException { TridentTopology topology = new TridentTopology(); Triden...
// Path: src/main/java/tutorial/storm/trident/operations/ExtractFollowerClassAndContentName.java // public class ExtractFollowerClassAndContentName extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Content content = (Content)tuple.get(0); // ...
.each(new Fields("content", "user"), new ExtractFollowerClassAndContentName(), new Fields("followerClass", "contentName"))
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/Part02_AdvancedPrimitives1.java
// Path: src/main/java/tutorial/storm/trident/operations/Print.java // public class Print extends BaseFilter { // private int partitionIndex; // private int numPartitions; // private final String name; // // public Print(){ // name = ""; // } // public Print(String name){ // thi...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.generated.StormTopology; import backtype.storm.tuple.Fields; import backtype.storm.tuple.Values; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import storm.trident.TridentTopology; import storm.trident.operation.BaseFilte...
package tutorial.storm.trident; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class Part02_AdvancedPrimitives1 { private static final Logger log = LoggerFactory.getLogger(Part02_AdvancedPrimitives1.class); public static void main(String[] args) throws Exception { Config conf = n...
// Path: src/main/java/tutorial/storm/trident/operations/Print.java // public class Print extends BaseFilter { // private int partitionIndex; // private int numPartitions; // private final String name; // // public Print(){ // name = ""; // } // public Print(String name){ // thi...
cluster.submitTopology("advanced_primitives", conf, advancedPrimitives(new FakeTweetsBatchSpout(1000)));
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/Part02_AdvancedPrimitives1.java
// Path: src/main/java/tutorial/storm/trident/operations/Print.java // public class Print extends BaseFilter { // private int partitionIndex; // private int numPartitions; // private final String name; // // public Print(){ // name = ""; // } // public Print(String name){ // thi...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.generated.StormTopology; import backtype.storm.tuple.Fields; import backtype.storm.tuple.Values; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import storm.trident.TridentTopology; import storm.trident.operation.BaseFilte...
package tutorial.storm.trident; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class Part02_AdvancedPrimitives1 { private static final Logger log = LoggerFactory.getLogger(Part02_AdvancedPrimitives1.class); public static void main(String[] args) throws Exception { Config conf = n...
// Path: src/main/java/tutorial/storm/trident/operations/Print.java // public class Print extends BaseFilter { // private int partitionIndex; // private int numPartitions; // private final String name; // // public Print(){ // name = ""; // } // public Print(String name){ // thi...
.aggregate(new Fields("location"), new StringCounter(), new Fields("aggregated_result"))
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/operations/TweetIdExtractor.java
// Path: src/main/java/tutorial/storm/trident/testutil/Content.java // public class Content { // private static final Logger log = LoggerFactory.getLogger(Content.class); // // private long tweetId; // private long userId; // private long createdAtMs; // // private String contentName; // priva...
import backtype.storm.tuple.Values; import storm.trident.operation.BaseFunction; import storm.trident.operation.TridentCollector; import storm.trident.tuple.TridentTuple; import tutorial.storm.trident.testutil.Content;
package tutorial.storm.trident.operations; /** * @author Davide Palmisano (davide.palmisano@peerindex.com) */ public class TweetIdExtractor extends BaseFunction { @Override public void execute(TridentTuple objects, TridentCollector tridentCollector) {
// Path: src/main/java/tutorial/storm/trident/testutil/Content.java // public class Content { // private static final Logger log = LoggerFactory.getLogger(Content.class); // // private long tweetId; // private long userId; // private long createdAtMs; // // private String contentName; // priva...
Content content = (Content) objects.getValueByField("content");
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/Part03_AdvancedPrimitives2.java
// Path: src/main/java/tutorial/storm/trident/operations/DivideAsDouble.java // public class DivideAsDouble extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Number n1 = (Number)tuple.get(0); // Number n2 = (Number)tuple.get(1); // ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.generated.StormTopology; import backtype.storm.tuple.Fields; import backtype.storm.tuple.Values; import com.google.common.collect.ImmutableList; import storm.trident.TridentTopology; import storm.trident.operation.builtin.Count; imp...
package tutorial.storm.trident; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class Part03_AdvancedPrimitives2 { public static void main(String[] args) throws Exception { Config conf = new Config(); // conf.put(Config.TOPOLOGY_DEBUG,true); LocalCluster cluster = new L...
// Path: src/main/java/tutorial/storm/trident/operations/DivideAsDouble.java // public class DivideAsDouble extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Number n1 = (Number)tuple.get(0); // Number n2 = (Number)tuple.get(1); // ...
.each(new Fields("age_sum", "count"), new DivideAsDouble(), new Fields("mean_age"))
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/Part03_AdvancedPrimitives2.java
// Path: src/main/java/tutorial/storm/trident/operations/DivideAsDouble.java // public class DivideAsDouble extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Number n1 = (Number)tuple.get(0); // Number n2 = (Number)tuple.get(1); // ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.generated.StormTopology; import backtype.storm.tuple.Fields; import backtype.storm.tuple.Values; import com.google.common.collect.ImmutableList; import storm.trident.TridentTopology; import storm.trident.operation.builtin.Count; imp...
package tutorial.storm.trident; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class Part03_AdvancedPrimitives2 { public static void main(String[] args) throws Exception { Config conf = new Config(); // conf.put(Config.TOPOLOGY_DEBUG,true); LocalCluster cluster = new L...
// Path: src/main/java/tutorial/storm/trident/operations/DivideAsDouble.java // public class DivideAsDouble extends BaseFunction { // @Override // public void execute(TridentTuple tuple, TridentCollector collector) { // Number n1 = (Number)tuple.get(0); // Number n2 = (Number)tuple.get(1); // ...
.each(new Fields("city", "mean_age"), new Print())
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/operations/ExtractLocation.java
// Path: src/main/java/tutorial/storm/trident/testutil/Content.java // public class Content { // private static final Logger log = LoggerFactory.getLogger(Content.class); // // private long tweetId; // private long userId; // private long createdAtMs; // // private String contentName; // priva...
import backtype.storm.tuple.Values; import storm.trident.operation.BaseFunction; import storm.trident.operation.TridentCollector; import storm.trident.tuple.TridentTuple; import tutorial.storm.trident.testutil.Content; import twitter4j.Status;
package tutorial.storm.trident.operations; /** * */ public class ExtractLocation extends BaseFunction { @Override public void execute(TridentTuple tuple, TridentCollector collector) { Status status = (Status) tuple.get(0);
// Path: src/main/java/tutorial/storm/trident/testutil/Content.java // public class Content { // private static final Logger log = LoggerFactory.getLogger(Content.class); // // private long tweetId; // private long userId; // private long createdAtMs; // // private String contentName; // priva...
Content content = (Content) tuple.get(1);
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/operations/ExtractFollowerClassAndContentName.java
// Path: src/main/java/tutorial/storm/trident/testutil/Content.java // public class Content { // private static final Logger log = LoggerFactory.getLogger(Content.class); // // private long tweetId; // private long userId; // private long createdAtMs; // // private String contentName; // priva...
import backtype.storm.tuple.Values; import storm.trident.operation.BaseFunction; import storm.trident.operation.TridentCollector; import storm.trident.tuple.TridentTuple; import tutorial.storm.trident.testutil.Content; import twitter4j.User;
package tutorial.storm.trident.operations; /** * @author Enno Shioji (enno.shioji@peerindex.com) */ public class ExtractFollowerClassAndContentName extends BaseFunction { @Override public void execute(TridentTuple tuple, TridentCollector collector) {
// Path: src/main/java/tutorial/storm/trident/testutil/Content.java // public class Content { // private static final Logger log = LoggerFactory.getLogger(Content.class); // // private long tweetId; // private long userId; // private long createdAtMs; // // private String contentName; // priva...
Content content = (Content)tuple.get(0);
peckb1/autojackson
examples/src/main/java/com/github/peckb1/examples/base/Fraggle.java
// Path: examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java // public class Wembley extends Fraggle { // public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, // @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats, // ...
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes.Type; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTyp...
package com.github.peckb1.examples.base; @JsonTypeInfo(use = Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "name") // not compile time checked @JsonSubTypes({
// Path: examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java // public class Wembley extends Fraggle { // public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, // @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats, // ...
@Type(value = Wembley.class, name = "WEMBLEY"), // not compile time checked
peckb1/autojackson
examples/src/main/java/com/github/peckb1/examples/base/Fraggle.java
// Path: examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java // public class Wembley extends Fraggle { // public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, // @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats, // ...
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes.Type; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTyp...
package com.github.peckb1.examples.base; @JsonTypeInfo(use = Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "name") // not compile time checked @JsonSubTypes({ @Type(value = Wembley.class, name = "WEMBLEY"), // not compile time checked
// Path: examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java // public class Wembley extends Fraggle { // public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, // @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats, // ...
@Type(value = Boober.class, name = "BOOBER") // not compile time checked
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/base/TestBaseModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java // public class Wembley extends Fraggle { // public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, // @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats, // ...
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.github.peckb1.examples.base....
package com.github.peckb1.examples.base; public class TestBaseModel { private ObjectMapper objectMapper; @Before public void setUp() throws Exception { this.objectMapper = new ObjectMapper(); this.objectMapper.registerModule(new Jdk8Module()); this.objectMapper.configure(Seriali...
// Path: examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java // public class Wembley extends Fraggle { // public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, // @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats, // ...
Assert.assertTrue(fraggle instanceof Wembley);
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/base/TestBaseModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java // public class Wembley extends Fraggle { // public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, // @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats, // ...
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.github.peckb1.examples.base....
package com.github.peckb1.examples.base; public class TestBaseModel { private ObjectMapper objectMapper; @Before public void setUp() throws Exception { this.objectMapper = new ObjectMapper(); this.objectMapper.registerModule(new Jdk8Module()); this.objectMapper.configure(Seriali...
// Path: examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java // public class Wembley extends Fraggle { // public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, // @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats, // ...
Assert.assertEquals(FraggleName.WEMBLEY, fraggle.getFraggleName());
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/base/TestBaseModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java // public class Wembley extends Fraggle { // public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, // @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats, // ...
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.github.peckb1.examples.base....
} @Test public void testSimpleModel() throws IOException { File baseModelFile = new File("resources/base_model.json"); FraggleList fraggleList = this.objectMapper.readValue(baseModelFile, FraggleList.class); checkFraggleList(fraggleList); String fraggleListJson = this.obje...
// Path: examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java // public class Wembley extends Fraggle { // public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, // @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats, // ...
Assert.assertTrue(fraggle instanceof Boober);
peckb1/autojackson
processor/src/main/java/com/github/peckb1/processor/util/SetupCreator.java
// Path: processor/src/main/java/com/github/peckb1/processor/util/DeserializerCreator.java // final static String DESERIALIZER_CLASS_NAME_SUFFIX = "_AutoJacksonDeserializer";
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; import com.github.peck...
package com.github.peckb1.processor.util; /** * Creates a single class that can be used to setup an {@link ObjectMapper} * with the deserializers and Jackson settings needed to allow the * {@link AutoJackson} to function correctly. * <p> * The class created is only a helper method to avoid the boiler plate of ...
// Path: processor/src/main/java/com/github/peckb1/processor/util/DeserializerCreator.java // final static String DESERIALIZER_CLASS_NAME_SUFFIX = "_AutoJacksonDeserializer"; // Path: processor/src/main/java/com/github/peckb1/processor/util/SetupCreator.java import com.fasterxml.jackson.annotation.JsonAutoDetect.Visi...
ClassName deserializerClassName = ClassName.get(deserializationPackage, element.getSimpleName() + DESERIALIZER_CLASS_NAME_SUFFIX);
peckb1/autojackson
examples/src/main/java/com/github/peckb1/examples/base/fraggles/Wembley.java
// Path: examples/src/main/java/com/github/peckb1/examples/base/Fraggle.java // @JsonTypeInfo(use = Id.NAME, // include = JsonTypeInfo.As.PROPERTY, // property = "name") // not compile time checked // @JsonSubTypes({ // @Type(value = Wembley.class, name = "WEMBLEY"), // not compile time checked ...
import com.fasterxml.jackson.annotation.JsonProperty; import com.github.peckb1.examples.base.Fraggle; import com.github.peckb1.examples.base.Job; import java.util.Optional;
package com.github.peckb1.examples.base.fraggles; public class Wembley extends Fraggle { public Wembley(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats,
// Path: examples/src/main/java/com/github/peckb1/examples/base/Fraggle.java // @JsonTypeInfo(use = Id.NAME, // include = JsonTypeInfo.As.PROPERTY, // property = "name") // not compile time checked // @JsonSubTypes({ // @Type(value = Wembley.class, name = "WEMBLEY"), // not compile time checked ...
@JsonProperty(value = JOB_KEY) Optional<Job> job) {
peckb1/autojackson
examples/src/main/java/com/github/peckb1/examples/base/fraggles/Boober.java
// Path: examples/src/main/java/com/github/peckb1/examples/base/Fraggle.java // @JsonTypeInfo(use = Id.NAME, // include = JsonTypeInfo.As.PROPERTY, // property = "name") // not compile time checked // @JsonSubTypes({ // @Type(value = Wembley.class, name = "WEMBLEY"), // not compile time checked ...
import com.fasterxml.jackson.annotation.JsonProperty; import com.github.peckb1.examples.base.Fraggle; import com.github.peckb1.examples.base.Job; import java.util.Optional;
package com.github.peckb1.examples.base.fraggles; public class Boober extends Fraggle { public Boober(@JsonProperty(value = HAIR_COLOUR_KEY, required = true) String hairColour, @JsonProperty(value = HAT_KEY, required = true) Boolean wearsHats,
// Path: examples/src/main/java/com/github/peckb1/examples/base/Fraggle.java // @JsonTypeInfo(use = Id.NAME, // include = JsonTypeInfo.As.PROPERTY, // property = "name") // not compile time checked // @JsonSubTypes({ // @Type(value = Wembley.class, name = "WEMBLEY"), // not compile time checked ...
@JsonProperty(value = JOB_KEY) Optional<Job> job) {
peckb1/autojackson
examples/src/main/java/com/github/peckb1/examples/auto/Fraggle.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.github.peckb1.examples.auto.fraggles.Boober; import com.github.peckb1.examples.auto.fraggles.Gobo; import com.github.peckb1.examples.auto.fraggles.Mokey; import com.github.peckb1.examples.auto.fraggles.Wembley; import com.github.peckb1.examples.auto.Fraggle.FraggleName; import com.github.peckb1.examples.auto...
package com.github.peckb1.examples.auto; @AutoJackson(type = @AutoJackson.Type(FraggleName.class)) public interface Fraggle<M extends Muppeteer> { FraggleName getName(); Integer getAge(); @Named("occupation") String getJob(); Optional<Fraggle> getRoommate(); M getMuppeteer(); enum FraggleNa...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
GOBO(Gobo.class),
peckb1/autojackson
examples/src/main/java/com/github/peckb1/examples/auto/Fraggle.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.github.peckb1.examples.auto.fraggles.Boober; import com.github.peckb1.examples.auto.fraggles.Gobo; import com.github.peckb1.examples.auto.fraggles.Mokey; import com.github.peckb1.examples.auto.fraggles.Wembley; import com.github.peckb1.examples.auto.Fraggle.FraggleName; import com.github.peckb1.examples.auto...
package com.github.peckb1.examples.auto; @AutoJackson(type = @AutoJackson.Type(FraggleName.class)) public interface Fraggle<M extends Muppeteer> { FraggleName getName(); Integer getAge(); @Named("occupation") String getJob(); Optional<Fraggle> getRoommate(); M getMuppeteer(); enum FraggleNa...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
MOKEY(Mokey.class),
peckb1/autojackson
examples/src/main/java/com/github/peckb1/examples/auto/Fraggle.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.github.peckb1.examples.auto.fraggles.Boober; import com.github.peckb1.examples.auto.fraggles.Gobo; import com.github.peckb1.examples.auto.fraggles.Mokey; import com.github.peckb1.examples.auto.fraggles.Wembley; import com.github.peckb1.examples.auto.Fraggle.FraggleName; import com.github.peckb1.examples.auto...
package com.github.peckb1.examples.auto; @AutoJackson(type = @AutoJackson.Type(FraggleName.class)) public interface Fraggle<M extends Muppeteer> { FraggleName getName(); Integer getAge(); @Named("occupation") String getJob(); Optional<Fraggle> getRoommate(); M getMuppeteer(); enum FraggleNa...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
WEMBLEY(Wembley.class),
peckb1/autojackson
examples/src/main/java/com/github/peckb1/examples/auto/Fraggle.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.github.peckb1.examples.auto.fraggles.Boober; import com.github.peckb1.examples.auto.fraggles.Gobo; import com.github.peckb1.examples.auto.fraggles.Mokey; import com.github.peckb1.examples.auto.fraggles.Wembley; import com.github.peckb1.examples.auto.Fraggle.FraggleName; import com.github.peckb1.examples.auto...
package com.github.peckb1.examples.auto; @AutoJackson(type = @AutoJackson.Type(FraggleName.class)) public interface Fraggle<M extends Muppeteer> { FraggleName getName(); Integer getAge(); @Named("occupation") String getJob(); Optional<Fraggle> getRoommate(); M getMuppeteer(); enum FraggleNa...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
BOOBER(Boober.class),
peckb1/autojackson
examples/src/main/java/com/github/peckb1/examples/auto/Fraggle.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.github.peckb1.examples.auto.fraggles.Boober; import com.github.peckb1.examples.auto.fraggles.Gobo; import com.github.peckb1.examples.auto.fraggles.Mokey; import com.github.peckb1.examples.auto.fraggles.Wembley; import com.github.peckb1.examples.auto.Fraggle.FraggleName; import com.github.peckb1.examples.auto...
package com.github.peckb1.examples.auto; @AutoJackson(type = @AutoJackson.Type(FraggleName.class)) public interface Fraggle<M extends Muppeteer> { FraggleName getName(); Integer getAge(); @Named("occupation") String getJob(); Optional<Fraggle> getRoommate(); M getMuppeteer(); enum FraggleNa...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
RED(Red.class);
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/auto/TestModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.github.peckb1.examp...
Gorg[] gorgArray = sample.getGorgArray(); assertEquals(2, gorgArray.length); checkQueen(gorgArray[0]); checkKing(gorgArray[1]); assertEquals(Instant.parse("2000-01-01T00:00:00Z"), sample.getStartTime()); assertEquals(Date.from(Instant.parse("2001-01-01T00:00:00Z")), samp...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
assertEquals(FraggleName.BOOBER, fraggle.getName());
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/auto/TestModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.github.peckb1.examp...
assertEquals(Instant.parse("2000-01-01T00:00:00Z"), sample.getStartTime()); assertEquals(Date.from(Instant.parse("2001-01-01T00:00:00Z")), sample.getEndTime()); } private void checkQueen(Gorg gorg) { assertEquals("Queen", gorg.getName()); assertEquals(38, (int) gorg.getAge()); ...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
assertTrue(muppeteer instanceof DaveGoelz);
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/auto/TestModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.github.peckb1.examp...
assertEquals(Date.from(Instant.parse("2001-01-01T00:00:00Z")), sample.getEndTime()); } private void checkQueen(Gorg gorg) { assertEquals("Queen", gorg.getName()); assertEquals(38, (int) gorg.getAge()); assertTrue(gorg.getChild().isPresent()); gorg.getChild().ifPresent(th...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
assertEquals(9001, ((Boober) fraggle).getNumberOfSuperstitions());
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/auto/TestModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.github.peckb1.examp...
} private void checkKing(Gorg gorg) { assertEquals("King", gorg.getName()); assertEquals(42, (int) gorg.getAge()); assertTrue(gorg.getChild().isPresent()); gorg.getChild().ifPresent(this::checkJunior); } private void checkJunior(Gorg gorg) { assertEquals("Junior...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
assertEquals(500, ((Mokey) fraggle).getRadishesPicked());
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/auto/TestModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.github.peckb1.examp...
assertEquals("King", gorg.getName()); assertEquals(42, (int) gorg.getAge()); assertTrue(gorg.getChild().isPresent()); gorg.getChild().ifPresent(this::checkJunior); } private void checkJunior(Gorg gorg) { assertEquals("Junior", gorg.getName()); assertEquals(15, (i...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
assertFalse(muppeteer instanceof KathrynMullen);
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/auto/TestModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.github.peckb1.examp...
assertFalse(gorg.getChild().isPresent()); } private void checkBoober(Fraggle fraggle) { assertEquals(FraggleName.BOOBER, fraggle.getName()); assertEquals(11, (int) fraggle.getAge()); assertEquals("clothes washer", fraggle.getJob()); Muppeteer muppeteer = fraggle.getMuppe...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
assertTrue(muppeteer instanceof JerryNelson);
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/auto/TestModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.github.peckb1.examp...
private void checkBoober(Fraggle fraggle) { assertEquals(FraggleName.BOOBER, fraggle.getName()); assertEquals(11, (int) fraggle.getAge()); assertEquals("clothes washer", fraggle.getJob()); Muppeteer muppeteer = fraggle.getMuppeteer(); assertTrue(muppeteer instanceof DaveGoel...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
assertEquals(20, ((Gobo) fraggle).getFetchedPostcards());
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/auto/TestModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.github.peckb1.examp...
assertEquals(500, ((Mokey) fraggle).getRadishesPicked()); assertFalse(fraggle.getRoommate().isPresent()); Muppeteer muppeteer = fraggle.getMuppeteer(); assertFalse(muppeteer instanceof KathrynMullen); assertEquals("Kathryn Mullen", muppeteer.getName()); } private void ch...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
assertTrue(muppeteer instanceof SteveWhitmire);
peckb1/autojackson
examples/src/test/java/com/github/peckb1/examples/auto/TestModel.java
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.github.peckb1.examp...
Muppeteer muppeteer = fraggle.getMuppeteer(); assertFalse(muppeteer instanceof KathrynMullen); assertEquals("Kathryn Mullen", muppeteer.getName()); } private void checkGobo(Fraggle fraggle) throws IOException { assertEquals(FraggleName.GOBO, fraggle.getName()); assertEqu...
// Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Boober.java // @AutoJackson // public interface Boober extends Fraggle<DaveGoelz> { // // @Named("superstitions") long getNumberOfSuperstitions(); // // } // // Path: examples/src/main/java/com/github/peckb1/examples/auto/fraggles/Gobo.java...
assertEquals(15, ((Wembley) fraggle).getNumberOfFiresPutOut());
uzyovoys/aggregate
modules/dictation/src/main/java/com/aggregate/dictation/Dictation.java
// Path: api/java-api/src/main/java/com/aggregate/api/Pattern.java // public class Pattern { // public static final String TEXT = "Text"; // public static final String NUMBER = "Number"; // public static final String DATE = "Date"; // public static final String TIME = "Time"; // } // // Path: api/java-...
import com.aggregate.api.Pattern; import com.aggregate.api.Request; import com.aggregate.api.Response; import io.vertx.core.AbstractVerticle; import io.vertx.core.json.JsonArray; import io.vertx.core.json.JsonObject; import io.vertx.core.logging.Logger; import io.vertx.core.logging.LoggerFactory; import java.awt.*; imp...
package com.aggregate.dictation; /** * Created by morfeusys on 24.02.16. */ public class Dictation extends AbstractVerticle { private static Logger log = LoggerFactory.getLogger(Dictation.class); private String osName; @Override public void start() throws Exception { osName = System.getPr...
// Path: api/java-api/src/main/java/com/aggregate/api/Pattern.java // public class Pattern { // public static final String TEXT = "Text"; // public static final String NUMBER = "Number"; // public static final String DATE = "Date"; // public static final String TIME = "Time"; // } // // Path: api/java-...
vertx.eventBus().consumer("cmd.dictation.type", m -> type(Request.fromMessage(m)));
uzyovoys/aggregate
modules/dictation/src/main/java/com/aggregate/dictation/Dictation.java
// Path: api/java-api/src/main/java/com/aggregate/api/Pattern.java // public class Pattern { // public static final String TEXT = "Text"; // public static final String NUMBER = "Number"; // public static final String DATE = "Date"; // public static final String TIME = "Time"; // } // // Path: api/java-...
import com.aggregate.api.Pattern; import com.aggregate.api.Request; import com.aggregate.api.Response; import io.vertx.core.AbstractVerticle; import io.vertx.core.json.JsonArray; import io.vertx.core.json.JsonObject; import io.vertx.core.logging.Logger; import io.vertx.core.logging.LoggerFactory; import java.awt.*; imp...
package com.aggregate.dictation; /** * Created by morfeusys on 24.02.16. */ public class Dictation extends AbstractVerticle { private static Logger log = LoggerFactory.getLogger(Dictation.class); private String osName; @Override public void start() throws Exception { osName = System.getPr...
// Path: api/java-api/src/main/java/com/aggregate/api/Pattern.java // public class Pattern { // public static final String TEXT = "Text"; // public static final String NUMBER = "Number"; // public static final String DATE = "Date"; // public static final String TIME = "Time"; // } // // Path: api/java-...
String text = request.markup.get(Pattern.TEXT).source;
uzyovoys/aggregate
modules/dictation/src/main/java/com/aggregate/dictation/Dictation.java
// Path: api/java-api/src/main/java/com/aggregate/api/Pattern.java // public class Pattern { // public static final String TEXT = "Text"; // public static final String NUMBER = "Number"; // public static final String DATE = "Date"; // public static final String TIME = "Time"; // } // // Path: api/java-...
import com.aggregate.api.Pattern; import com.aggregate.api.Request; import com.aggregate.api.Response; import io.vertx.core.AbstractVerticle; import io.vertx.core.json.JsonArray; import io.vertx.core.json.JsonObject; import io.vertx.core.logging.Logger; import io.vertx.core.logging.LoggerFactory; import java.awt.*; imp...
vertx.eventBus().send("key.addKeyAction", config); } }); } private void type(Request request) { String text = request.markup.get(Pattern.TEXT).source; if (!text.isEmpty()) { type(text); } } private void type(String text) { ...
// Path: api/java-api/src/main/java/com/aggregate/api/Pattern.java // public class Pattern { // public static final String TEXT = "Text"; // public static final String NUMBER = "Number"; // public static final String DATE = "Date"; // public static final String TIME = "Time"; // } // // Path: api/java-...
vertx.eventBus().send("response", new Response("dictation.text", true));
uzyovoys/aggregate
modules/dusi/src/main/java/com/aggregate/dusi/DusiAssistant.java
// Path: api/java-api/src/main/java/com/aggregate/api/Request.java // public class Request { // /** // * Markup of input speech // * @see Markup // */ // public final Markup markup; // // public Request(Markup markup) { // this.markup = markup; // } // // /** // * Conve...
import com.aggregate.api.Request; import com.aggregate.api.Response; import io.vertx.core.AbstractVerticle; import io.vertx.core.Future; import io.vertx.core.json.JsonObject; import io.vertx.core.logging.Logger; import io.vertx.core.logging.LoggerFactory; import org.java_websocket.WebSocket; import org.java_websocket.c...
package com.aggregate.dusi; /** * Created by morfeusys on 22.02.16. */ public class DusiAssistant extends AbstractVerticle { private static Logger log = LoggerFactory.getLogger(DusiAssistant.class); private String id; private WSClient wsClient; @Override public void start(Future<Void> f) thro...
// Path: api/java-api/src/main/java/com/aggregate/api/Request.java // public class Request { // /** // * Markup of input speech // * @see Markup // */ // public final Markup markup; // // public Request(Markup markup) { // this.markup = markup; // } // // /** // * Conve...
process(Request.fromMessage(msg));
uzyovoys/aggregate
modules/dusi/src/main/java/com/aggregate/dusi/DusiAssistant.java
// Path: api/java-api/src/main/java/com/aggregate/api/Request.java // public class Request { // /** // * Markup of input speech // * @see Markup // */ // public final Markup markup; // // public Request(Markup markup) { // this.markup = markup; // } // // /** // * Conve...
import com.aggregate.api.Request; import com.aggregate.api.Response; import io.vertx.core.AbstractVerticle; import io.vertx.core.Future; import io.vertx.core.json.JsonObject; import io.vertx.core.logging.Logger; import io.vertx.core.logging.LoggerFactory; import org.java_websocket.WebSocket; import org.java_websocket.c...
} catch (InterruptedException e) { h.fail(e); } }, true, r -> { if (r.succeeded()) { send(input); } else { log.error("Cannot connect"); ...
// Path: api/java-api/src/main/java/com/aggregate/api/Request.java // public class Request { // /** // * Markup of input speech // * @see Markup // */ // public final Markup markup; // // public Request(Markup markup) { // this.markup = markup; // } // // /** // * Conve...
vertx.eventBus().publish("response", new Response(speeches, modal ? "com.aggregate.dusi" : null, modal));
xoodle/frost
app/src/main/java/com/studentsearch/xoodle/studentsearch/adapter/SliderAdapter.java
// Path: app/src/main/java/com/studentsearch/xoodle/studentsearch/StudentData.java // public class StudentData implements Parcelable { // // @SerializedName("a") // public String address; // // @SerializedName("b") // public String bloodGroup; // // @SerializedName("d") // public String dept; // // @S...
import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.studentsearch.xoodle.studentsearch.R; import com.studentsearch.xoodle.studentsearch.StudentData; import java.util.ArrayList;
package com.studentsearch.xoodle.studentsearch.adapter; /** * Created by kaushal on 7/7/17. */ public class SliderAdapter extends RecyclerView.Adapter<SliderCard> { private final int count; private final View.OnClickListener listener; private Context context;
// Path: app/src/main/java/com/studentsearch/xoodle/studentsearch/StudentData.java // public class StudentData implements Parcelable { // // @SerializedName("a") // public String address; // // @SerializedName("b") // public String bloodGroup; // // @SerializedName("d") // public String dept; // // @S...
private ArrayList<StudentData> studentList;
xoodle/frost
app/src/main/java/com/studentsearch/xoodle/studentsearch/database/DbHelper.java
// Path: app/src/main/java/com/studentsearch/xoodle/studentsearch/StudentData.java // public class StudentData implements Parcelable { // // @SerializedName("a") // public String address; // // @SerializedName("b") // public String bloodGroup; // // @SerializedName("d") // public String dept; // // @S...
import android.content.ContentValues; import android.content.Context; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import com.studentsearch.xoodle.studentsearch.StudentData; import java.io.Serializable; import static android.R.attr...
+ COLUMN_PROGRAMME + " TEXT, " + COLUMN_USER_NAME + " TEXT, " + COLUMN_YEAR + " TEXT);"; private static final String DROP_TABLE_IF_EXISTS = "DROP TABLE IF EXISTS " + TABLE_NAME; private DbHelper(Context context, String dbName, Integer version) { super(context, dbName, null, versio...
// Path: app/src/main/java/com/studentsearch/xoodle/studentsearch/StudentData.java // public class StudentData implements Parcelable { // // @SerializedName("a") // public String address; // // @SerializedName("b") // public String bloodGroup; // // @SerializedName("d") // public String dept; // // @S...
public void insertStudents(StudentData[] students) {
nhatminhle/cofoja
src/com/google/java/contract/core/apt/FactoryUtils.java
// Path: src/com/google/java/contract/core/model/ElementKind.java // public enum ElementKind { // /* // * Source elements. // */ // // /** // * A source file. // */ // SOURCE, // // /** // * A class. // */ // CLASS, // // /** // * An interface. // */ // INTERFACE, // // /** /...
import com.google.java.contract.Ensures; import com.google.java.contract.Invariant; import com.google.java.contract.Requires; import com.google.java.contract.core.model.ClassName; import com.google.java.contract.core.model.ElementKind; import com.google.java.contract.core.model.ElementModifier; import com.google.java.c...
List<? extends TypeMirror> bounds = element.getBounds(); if (bounds.isEmpty() || (bounds.size() == 1 && bounds.get(0).toString().equals("java.lang.Object"))) { return new TypeName(name); } StringBuilder buffer = new StringBuilder(); buffer.append(name); buffer.append("...
// Path: src/com/google/java/contract/core/model/ElementKind.java // public enum ElementKind { // /* // * Source elements. // */ // // /** // * A source file. // */ // SOURCE, // // /** // * A class. // */ // CLASS, // // /** // * An interface. // */ // INTERFACE, // // /** /...
ElementKind getAnnotationKindForName(AnnotationMirror annotation) {
nhatminhle/cofoja
test/com/google/java/contract/tests/StackTest.java
// Path: test/com/google/java/contract/examples/ArrayListStack.java // @Invariant("elements != null") // public class ArrayListStack<T> implements Stack<T> { // protected ArrayList<T> elements; // // public ArrayListStack() { // elements = new ArrayList<T>(); // } // // @Override // public int size() { ...
import com.google.java.contract.InvariantError; import com.google.java.contract.PostconditionError; import com.google.java.contract.PreconditionError; import com.google.java.contract.examples.ArrayListStack; import com.google.java.contract.examples.Stack; import junit.framework.TestCase;
/** * A stack implementation that simply stores the last element. This * implementation suffices to fool our contracts. */ public static class BogusLastElementStack<T> extends BogusCountingStack<T> { protected T lastElement; @Override public T peek() { return lastElement; } ...
// Path: test/com/google/java/contract/examples/ArrayListStack.java // @Invariant("elements != null") // public class ArrayListStack<T> implements Stack<T> { // protected ArrayList<T> elements; // // public ArrayListStack() { // elements = new ArrayList<T>(); // } // // @Override // public int size() { ...
stack = new ArrayListStack<Integer>();
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/ddd/DuplicateEntityException.java
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J";
import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializable; import jakarta.json.bind.annotation.JsonbProperty; import jakarta.validation.constraints.NotNull; import jakarta.xml.bind.annotat...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J"; // Path: src/main/java/org/fuin/ddd4j/ddd/DuplicateEntityException.java import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.D...
public static final String SHORT_ID = SHORT_ID_PREFIX + "-DUPLICATE_ENTITY";
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/EntityNotFoundExceptionTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import org.junit.Test; import org.xmlunit.builder.DiffBuilder; import org.xmlunit.diff.Diff; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marshal; import static org.fuin.utils4j.Jax...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
final EntityNotFoundException original = new EntityNotFoundException(new EntityIdPath(new AId(1L)), new BId(1));
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/EntityNotFoundExceptionTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import org.junit.Test; import org.xmlunit.builder.DiffBuilder; import org.xmlunit.diff.Diff; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marshal; import static org.fuin.utils4j.Jax...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
final EntityNotFoundException original = new EntityNotFoundException(new EntityIdPath(new AId(1L)), new BId(1));
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/EntityIdConverterTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; import org.fuin.ddd4j.test.AId; import org.fuin.objects4j.common.ConstraintViolationException; import org.junit.Test;
// TEST & VERIFY testee.requireArgValid("a", null); testee.requireArgValid("x", "A 1"); try { testee.requireArgValid("a", "X 1"); fail("Expected exception"); } catch (final ConstraintViolationException ex) { assertThat(ex.getMessag...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
assertThat(entityId).isInstanceOf(AId.class);
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/VendorKey.java
// Path: src/main/java/org/fuin/ddd4j/ddd/BusinessKey.java // public interface BusinessKey extends Serializable { // // }
import org.fuin.objects4j.common.Immutable; import jakarta.validation.constraints.NotNull; import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.fuin.ddd4j.ddd.BusinessKey; import org.fuin.objects4j.common.Contract; import org.fuin.objects4j.ui.Label; import org.fuin.objects4j.ui.ShortLabel; ...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/BusinessKey.java // public interface BusinessKey extends Serializable { // // } // Path: src/test/java/org/fuin/ddd4j/test/VendorKey.java import org.fuin.objects4j.common.Immutable; import jakarta.validation.constraints.NotNull; import jakarta.xml.bind.annotation.adapte...
public final class VendorKey extends AbstractStringValueObject implements BusinessKey {
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/ddd/EncryptionKeyIdUnknownException.java
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J";
import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializable; import jakarta.json.bind.annotation.JsonbProperty; import jakarta.validation.constraints.NotEmpty; import jakarta.xml.bind.annota...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J"; // Path: src/main/java/org/fuin/ddd4j/ddd/EncryptionKeyIdUnknownException.java import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4...
public static final String SHORT_ID = SHORT_ID_PREFIX + "-ENCRYPTION_KEY_ID_UNKNOWN";
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/ddd/AggregateDeletedException.java
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J";
import org.fuin.objects4j.common.MarshalInformation; import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializable; import jakarta.json.bind.annotation.JsonbProperty; import jakarta.validation...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J"; // Path: src/main/java/org/fuin/ddd4j/ddd/AggregateDeletedException.java import org.fuin.objects4j.common.MarshalInformation; import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.object...
public static final String SHORT_ID = SHORT_ID_PREFIX + "-AGGREGATE_DELETED";
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/AggregateVersionConflictExceptionTest.java
// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java // @Immutable // @XmlJavaTypeAdapter(VendorIdConverter.class) // public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> { // // private static final long serialVersionUID = 1000L; // // ...
import org.fuin.ddd4j.test.VendorId; import org.junit.Test; import org.xmlunit.builder.DiffBuilder; import org.xmlunit.diff.Diff; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marsha...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java // @Immutable // @XmlJavaTypeAdapter(VendorIdConverter.class) // public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> { // // private static final long serialVersionUID = 1000L; // // ...
final VendorId vendorId = new VendorId(UUID.fromString("4dcf4c2c-10e1-4db9-ba9e-d1e644e9d119"));
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/CEntity.java
// Path: src/main/java/org/fuin/ddd4j/ddd/AbstractEntity.java // public abstract class AbstractEntity<ROOT_ID extends AggregateRootId, ROOT extends AbstractAggregateRoot<ROOT_ID>, ID extends EntityId> // implements Entity<ID> { // // CHECKSTYLE:ON:LineLength // // private final ROOT root; // // ...
import org.fuin.ddd4j.ddd.AbstractEntity; import org.fuin.ddd4j.ddd.ApplyEvent; import org.fuin.ddd4j.ddd.EntityType;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/main/java/org/fuin/ddd4j/ddd/AbstractEntity.java // public abstract class AbstractEntity<ROOT_ID extends AggregateRootId, ROOT extends AbstractAggregateRoot<ROOT_ID>, ID extends EntityId> // implements Entity<ID> { // // CHECKSTYLE:ON:LineLength // // private final ROOT root; // // ...
public EntityType getType() {
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/AggregateVersionNotFoundExceptionTest.java
// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java // @Immutable // @XmlJavaTypeAdapter(VendorIdConverter.class) // public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> { // // private static final long serialVersionUID = 1000L; // // ...
import org.fuin.ddd4j.test.VendorId; import org.junit.Test; import org.xmlunit.builder.DiffBuilder; import org.xmlunit.diff.Diff; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marsha...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java // @Immutable // @XmlJavaTypeAdapter(VendorIdConverter.class) // public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> { // // private static final long serialVersionUID = 1000L; // // ...
final VendorId vendorId = new VendorId(UUID.fromString("4dcf4c2c-10e1-4db9-ba9e-d1e644e9d119"));
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/ddd/AggregateVersionNotFoundException.java
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J";
import org.fuin.objects4j.common.MarshalInformation; import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializable; import jakarta.json.bind.annotation.JsonbProperty; import jakarta.validation...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J"; // Path: src/main/java/org/fuin/ddd4j/ddd/AggregateVersionNotFoundException.java import org.fuin.objects4j.common.MarshalInformation; import org.fuin.objects4j.common.ToExceptionCapable; import org.fui...
public static final String SHORT_ID = SHORT_ID_PREFIX + "-AGGREGATE_VERSION_NOT_FOUND";
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/AId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // * // * @return Unique entity type name. // */ // public String asString(); // // } // // Path: src/main/java...
import org.fuin.ddd4j.ddd.EntityType; import org.fuin.ddd4j.ddd.StringBasedEntityType;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // * // * @return Unique entity type name. // */ // public String asString(); // // } // // Path: src/main/java...
public static final EntityType TYPE = new StringBasedEntityType("A");
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/AId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // * // * @return Unique entity type name. // */ // public String asString(); // // } // // Path: src/main/java...
import org.fuin.ddd4j.ddd.EntityType; import org.fuin.ddd4j.ddd.StringBasedEntityType;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // * // * @return Unique entity type name. // */ // public String asString(); // // } // // Path: src/main/java...
public static final EntityType TYPE = new StringBasedEntityType("A");
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/Person.java
// Path: src/main/java/org/fuin/ddd4j/ddd/AbstractEntity.java // public abstract class AbstractEntity<ROOT_ID extends AggregateRootId, ROOT extends AbstractAggregateRoot<ROOT_ID>, ID extends EntityId> // implements Entity<ID> { // // CHECKSTYLE:ON:LineLength // // private final ROOT root; // // ...
import jakarta.validation.constraints.NotNull; import org.fuin.ddd4j.ddd.AbstractEntity; import org.fuin.ddd4j.ddd.ApplyEvent; import org.fuin.ddd4j.ddd.EntityType; import org.fuin.objects4j.common.Contract;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/main/java/org/fuin/ddd4j/ddd/AbstractEntity.java // public abstract class AbstractEntity<ROOT_ID extends AggregateRootId, ROOT extends AbstractAggregateRoot<ROOT_ID>, ID extends EntityId> // implements Entity<ID> { // // CHECKSTYLE:ON:LineLength // // private final ROOT root; // // ...
public final EntityType getType() {
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/VendorExampleTest.java
// Path: src/main/java/org/fuin/ddd4j/ddd/DomainEvent.java // public interface DomainEvent<ID extends EntityId> extends Event { // // /** // * Returns the path to the originator of the event. // * // * @return List of unique identifiers from aggregate root to the entity that emitted the event....
import static org.assertj.core.api.Assertions.assertThat; import java.util.List; import java.util.UUID; import org.fuin.ddd4j.ddd.DomainEvent; import org.fuin.ddd4j.test.Vendor.ConstructorService; import org.junit.Test;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/main/java/org/fuin/ddd4j/ddd/DomainEvent.java // public interface DomainEvent<ID extends EntityId> extends Event { // // /** // * Returns the path to the originator of the event. // * // * @return List of unique identifiers from aggregate root to the entity that emitted the event....
ConstructorService service = new ConstructorService() {
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/VendorExampleTest.java
// Path: src/main/java/org/fuin/ddd4j/ddd/DomainEvent.java // public interface DomainEvent<ID extends EntityId> extends Event { // // /** // * Returns the path to the originator of the event. // * // * @return List of unique identifiers from aggregate root to the entity that emitted the event....
import static org.assertj.core.api.Assertions.assertThat; import java.util.List; import java.util.UUID; import org.fuin.ddd4j.ddd.DomainEvent; import org.fuin.ddd4j.test.Vendor.ConstructorService; import org.junit.Test;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/main/java/org/fuin/ddd4j/ddd/DomainEvent.java // public interface DomainEvent<ID extends EntityId> extends Event { // // /** // * Returns the path to the originator of the event. // * // * @return List of unique identifiers from aggregate root to the entity that emitted the event....
List<DomainEvent<?>> events = vendor.getUncommittedChanges();
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/ddd/AggregateAlreadyExistsException.java
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J";
import org.fuin.objects4j.common.MarshalInformation; import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializable; import jakarta.json.bind.annotation.JsonbProperty; import jakarta.validation...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J"; // Path: src/main/java/org/fuin/ddd4j/ddd/AggregateAlreadyExistsException.java import org.fuin.objects4j.common.MarshalInformation; import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin....
public static final String SHORT_ID = SHORT_ID_PREFIX + "-AGGREGATE_ALREADY_EXISTS";
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/ddd/EncryptionKeyVersionUnknownException.java
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J";
import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializable; import jakarta.json.bind.annotation.JsonbProperty; import jakarta.validation.constraints.NotEmpty; import jakarta.xml.bind.annota...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J"; // Path: src/main/java/org/fuin/ddd4j/ddd/EncryptionKeyVersionUnknownException.java import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin...
public static final String SHORT_ID = SHORT_ID_PREFIX + "-ENCRYPTION_KEY_VERSION_UNKNOWN";
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/ddd/EntityNotFoundException.java
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J";
import org.fuin.objects4j.common.Nullable; import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializable; import jakarta.json.bind.annotation.JsonbProperty; import jakarta.validation.constrain...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J"; // Path: src/main/java/org/fuin/ddd4j/ddd/EntityNotFoundException.java import org.fuin.objects4j.common.Nullable; import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.Value...
public static final String SHORT_ID = SHORT_ID_PREFIX + "-ENTITY_NOT_FOUND";
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/AbstractDomainEventTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marshal; import static org.fuin.utils4j.JaxbUtils.unmarshal; import static org.fuin.utils4j.Utils4J.deserialize; import static org.fuin.utils4j.Utils4J.serialize; import java.time.ZoneId; import java.time.ZonedDateTime; i...
package org.fuin.ddd4j.ddd; //CHECKSTYLE:OFF Test code public class AbstractDomainEventTest { private static final EventType MY_EVENT_1_TYPE = new EventType("MyEvent1"); private static final EventType MY_EVENT_2_TYPE = new EventType("MyEvent2"); @Test public final void testConstructorCorrelation...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
final VendorId vendorId = new VendorId();
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/AbstractDomainEventTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marshal; import static org.fuin.utils4j.JaxbUtils.unmarshal; import static org.fuin.utils4j.Utils4J.deserialize; import static org.fuin.utils4j.Utils4J.serialize; import java.time.ZoneId; import java.time.ZonedDateTime; i...
package org.fuin.ddd4j.ddd; //CHECKSTYLE:OFF Test code public class AbstractDomainEventTest { private static final EventType MY_EVENT_1_TYPE = new EventType("MyEvent1"); private static final EventType MY_EVENT_2_TYPE = new EventType("MyEvent2"); @Test public final void testConstructorCorrelation...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
final AId aid = new AId(1L);
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/BId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityId.java // public interface EntityId extends TechnicalId { // // /** // * Returns the type represented by this identifier. // * // * @return Type of entity. // */ // public EntityType getType(); // // /** // * Returns the ...
import org.fuin.ddd4j.ddd.EntityId; import org.fuin.ddd4j.ddd.EntityType; import org.fuin.ddd4j.ddd.StringBasedEntityType;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityId.java // public interface EntityId extends TechnicalId { // // /** // * Returns the type represented by this identifier. // * // * @return Type of entity. // */ // public EntityType getType(); // // /** // * Returns the ...
public static final EntityType TYPE = new StringBasedEntityType("B");
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/BId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityId.java // public interface EntityId extends TechnicalId { // // /** // * Returns the type represented by this identifier. // * // * @return Type of entity. // */ // public EntityType getType(); // // /** // * Returns the ...
import org.fuin.ddd4j.ddd.EntityId; import org.fuin.ddd4j.ddd.EntityType; import org.fuin.ddd4j.ddd.StringBasedEntityType;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityId.java // public interface EntityId extends TechnicalId { // // /** // * Returns the type represented by this identifier. // * // * @return Type of entity. // */ // public EntityType getType(); // // /** // * Returns the ...
public static final EntityType TYPE = new StringBasedEntityType("B");
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/VendorId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java // public interface AggregateRootId extends EntityId { // // } // // Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // ...
import java.util.UUID; import org.fuin.objects4j.common.Immutable; import jakarta.validation.constraints.NotNull; import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.fuin.ddd4j.ddd.AggregateRootId; import org.fuin.ddd4j.ddd.EntityType; import org.fuin.ddd4j.ddd.StringBasedEntityType; impor...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java // public interface AggregateRootId extends EntityId { // // } // // Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // ...
public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> {
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/VendorId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java // public interface AggregateRootId extends EntityId { // // } // // Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // ...
import java.util.UUID; import org.fuin.objects4j.common.Immutable; import jakarta.validation.constraints.NotNull; import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.fuin.ddd4j.ddd.AggregateRootId; import org.fuin.ddd4j.ddd.EntityType; import org.fuin.ddd4j.ddd.StringBasedEntityType; impor...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java // public interface AggregateRootId extends EntityId { // // } // // Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // ...
public static final EntityType ENTITY_TYPE = new StringBasedEntityType("Vendor");
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/VendorId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java // public interface AggregateRootId extends EntityId { // // } // // Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // ...
import java.util.UUID; import org.fuin.objects4j.common.Immutable; import jakarta.validation.constraints.NotNull; import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.fuin.ddd4j.ddd.AggregateRootId; import org.fuin.ddd4j.ddd.EntityType; import org.fuin.ddd4j.ddd.StringBasedEntityType; impor...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java // public interface AggregateRootId extends EntityId { // // } // // Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // ...
public static final EntityType ENTITY_TYPE = new StringBasedEntityType("Vendor");
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/CId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityId.java // public interface EntityId extends TechnicalId { // // /** // * Returns the type represented by this identifier. // * // * @return Type of entity. // */ // public EntityType getType(); // // /** // * Returns the ...
import org.fuin.ddd4j.ddd.EntityId; import org.fuin.ddd4j.ddd.EntityType; import org.fuin.ddd4j.ddd.StringBasedEntityType;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityId.java // public interface EntityId extends TechnicalId { // // /** // * Returns the type represented by this identifier. // * // * @return Type of entity. // */ // public EntityType getType(); // // /** // * Returns the ...
public static final EntityType TYPE = new StringBasedEntityType("C");
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/test/CId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityId.java // public interface EntityId extends TechnicalId { // // /** // * Returns the type represented by this identifier. // * // * @return Type of entity. // */ // public EntityType getType(); // // /** // * Returns the ...
import org.fuin.ddd4j.ddd.EntityId; import org.fuin.ddd4j.ddd.EntityType; import org.fuin.ddd4j.ddd.StringBasedEntityType;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityId.java // public interface EntityId extends TechnicalId { // // /** // * Returns the type represented by this identifier. // * // * @return Type of entity. // */ // public EntityType getType(); // // /** // * Returns the ...
public static final EntityType TYPE = new StringBasedEntityType("C");
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/AggregateDeletedExceptionTest.java
// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java // @Immutable // @XmlJavaTypeAdapter(VendorIdConverter.class) // public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> { // // private static final long serialVersionUID = 1000L; // // ...
import org.fuin.ddd4j.test.VendorId; import org.junit.Test; import org.xmlunit.builder.DiffBuilder; import org.xmlunit.diff.Diff; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marsha...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java // @Immutable // @XmlJavaTypeAdapter(VendorIdConverter.class) // public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> { // // private static final long serialVersionUID = 1000L; // // ...
final VendorId vendorId = new VendorId(UUID.fromString("4dcf4c2c-10e1-4db9-ba9e-d1e644e9d119"));
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/ddd/DuplicateEncryptionKeyIdException.java
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J";
import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializable; import jakarta.json.bind.annotation.JsonbProperty; import jakarta.validation.constraints.NotEmpty; import jakarta.xml.bind.annota...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J"; // Path: src/main/java/org/fuin/ddd4j/ddd/DuplicateEncryptionKeyIdException.java import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.dd...
public static final String SHORT_ID = SHORT_ID_PREFIX + "-DUPLICATE-ENCRYPTION_KEY_ID";
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/ddd/DecryptionFailedException.java
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J";
import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializable; import jakarta.json.bind.annotation.JsonbProperty; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annot...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J"; // Path: src/main/java/org/fuin/ddd4j/ddd/DecryptionFailedException.java import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializab...
public static final String SHORT_ID = SHORT_ID_PREFIX + "-DECRYPTION_FAILED";
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/AggregateAlreadyExistsExceptionTest.java
// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java // @Immutable // @XmlJavaTypeAdapter(VendorIdConverter.class) // public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> { // // private static final long serialVersionUID = 1000L; // // ...
import org.fuin.ddd4j.test.VendorId; import org.junit.Test; import org.xmlunit.builder.DiffBuilder; import org.xmlunit.diff.Diff; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marsha...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java // @Immutable // @XmlJavaTypeAdapter(VendorIdConverter.class) // public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> { // // private static final long serialVersionUID = 1000L; // // ...
final VendorId vendorId = new VendorId(UUID.fromString("4dcf4c2c-10e1-4db9-ba9e-d1e644e9d119"));
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/AggregateNotFoundExceptionTest.java
// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java // @Immutable // @XmlJavaTypeAdapter(VendorIdConverter.class) // public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> { // // private static final long serialVersionUID = 1000L; // // ...
import org.fuin.ddd4j.test.VendorId; import org.junit.Test; import org.xmlunit.builder.DiffBuilder; import org.xmlunit.diff.Diff; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marsha...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java // @Immutable // @XmlJavaTypeAdapter(VendorIdConverter.class) // public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> { // // private static final long serialVersionUID = 1000L; // // ...
final VendorId vendorId = new VendorId(UUID.fromString("4dcf4c2c-10e1-4db9-ba9e-d1e644e9d119"));
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/DomainEventExpectedEntityIdPathValidatorTest.java
// Path: src/test/java/org/fuin/ddd4j/test/ACreatedEvent.java // public class ACreatedEvent extends AbstractDomainEvent<AId> { // // private static final long serialVersionUID = 1L; // // private static final EventType EVENT_TYPE = new EventType("ACreatedEvent"); // // private AId id; // // public A...
import static org.assertj.core.api.Assertions.assertThat; import java.lang.annotation.Annotation; import jakarta.validation.Payload; import org.fuin.ddd4j.test.ACreatedEvent; import org.fuin.ddd4j.test.AId; import org.fuin.ddd4j.test.BId; import org.fuin.ddd4j.test.CAddedEvent; import org.fuin.ddd4j.test.CEvent; import...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/ACreatedEvent.java // public class ACreatedEvent extends AbstractDomainEvent<AId> { // // private static final long serialVersionUID = 1L; // // private static final EventType EVENT_TYPE = new EventType("ACreatedEvent"); // // private AId id; // // public A...
final DomainEventExpectedEntityIdPath anno = createAnnotation(AId.class);
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/esrepo/AggregateStreamId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java // public interface AggregateRootId extends EntityId { // // } // // Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // ...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.fuin.objects4j.common.Immutable; import org.fuin.ddd4j.ddd.AggregateRootId; import org.fuin.ddd4j.ddd.EntityType; import org.fuin.esc.api.StreamId; import org.fuin.objects4j.vo.KeyValue;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java // public interface AggregateRootId extends EntityId { // // } // // Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // ...
private EntityType type;
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/esrepo/AggregateStreamId.java
// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java // public interface AggregateRootId extends EntityId { // // } // // Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // ...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.fuin.objects4j.common.Immutable; import org.fuin.ddd4j.ddd.AggregateRootId; import org.fuin.ddd4j.ddd.EntityType; import org.fuin.esc.api.StreamId; import org.fuin.objects4j.vo.KeyValue;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java // public interface AggregateRootId extends EntityId { // // } // // Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java // public interface EntityType extends Serializable { // // /** // * Returns the entity type name as string. // ...
private AggregateRootId paramValue;
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/DuplicateEntityExceptionTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import org.junit.Test; import org.xmlunit.builder.DiffBuilder; import org.xmlunit.diff.Diff; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marshal; import static org.fuin.utils4j.Jax...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
final DuplicateEntityException original = new DuplicateEntityException(new EntityIdPath(new AId(1L)), new BId(1));
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/DuplicateEntityExceptionTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import org.junit.Test; import org.xmlunit.builder.DiffBuilder; import org.xmlunit.diff.Diff; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; import static org.assertj.core.api.Assertions.assertThat; import static org.fuin.utils4j.JaxbUtils.marshal; import static org.fuin.utils4j.Jax...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
final DuplicateEntityException original = new DuplicateEntityException(new EntityIdPath(new AId(1L)), new BId(1));
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/EntityIdPathConverterTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; import java.util.Iterator; import org.fuin.ddd4j.test.AId; import org.fuin.ddd4j.test.BId; import org.fuin.ddd4j.test.CId; import org.fuin.objects4j.common.ConstraintViolationException; import org.junit.Test;
fail("Expected exception"); } catch (final ConstraintViolationException ex) { assertThat(ex.getMessage()).isEqualTo("The argument 'a' is not valid: 'X 1'"); } try { testee.requireArgValid("a", ""); fail("Expected exception"); } cat...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
assertValues(first, AId.class, "A", 1L);
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/EntityIdPathConverterTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; import java.util.Iterator; import org.fuin.ddd4j.test.AId; import org.fuin.ddd4j.test.BId; import org.fuin.ddd4j.test.CId; import org.fuin.objects4j.common.ConstraintViolationException; import org.junit.Test;
} @Test public void testToVOSingle() { // PREPARE final EntityIdPathConverter testee = new EntityIdPathConverter(new MyIdFactory()); EntityIdPath path; Iterator<EntityId> it; EntityId first; EntityId last; // TEST & VERIFY // ...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
assertValues(last, BId.class, "B", 2L);
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/EntityIdPathConverterTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; import java.util.Iterator; import org.fuin.ddd4j.test.AId; import org.fuin.ddd4j.test.BId; import org.fuin.ddd4j.test.CId; import org.fuin.objects4j.common.ConstraintViolationException; import org.junit.Test;
// TEST & VERIFY // Single path = testee.toVO("A 1"); first = path.first(); last = path.last(); assertValues(first, AId.class, "A", 1L); assertValues(last, AId.class, "A", 1L); assertThat(first).isSameAs(last); it = path.iterator(); ...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
assertValues(last, CId.class, "C", 3L);
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/ExpectedEntityIdPathValidatorTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import static org.assertj.core.api.Assertions.assertThat; import java.lang.annotation.Annotation; import jakarta.validation.Payload; import org.fuin.ddd4j.test.AId; import org.fuin.ddd4j.test.BId; import org.fuin.ddd4j.test.CId; import org.junit.Test;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
final ExpectedEntityIdPath anno = createAnnotation(AId.class);
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/ExpectedEntityIdPathValidatorTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import static org.assertj.core.api.Assertions.assertThat; import java.lang.annotation.Annotation; import jakarta.validation.Payload; import org.fuin.ddd4j.test.AId; import org.fuin.ddd4j.test.BId; import org.fuin.ddd4j.test.CId; import org.junit.Test;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
final BId bid = new BId(2L);
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/ExpectedEntityIdPathValidatorTest.java
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
import static org.assertj.core.api.Assertions.assertThat; import java.lang.annotation.Annotation; import jakarta.validation.Payload; import org.fuin.ddd4j.test.AId; import org.fuin.ddd4j.test.BId; import org.fuin.ddd4j.test.CId; import org.junit.Test;
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
// Path: src/test/java/org/fuin/ddd4j/test/AId.java // public class AId implements ImplRootId { // // private static final long serialVersionUID = 1L; // // public static final EntityType TYPE = new StringBasedEntityType("A"); // // private final long id; // // public AId(final long id) { /...
final CId cid = new CId(3L);
fuinorg/ddd-4-java
src/main/java/org/fuin/ddd4j/ddd/AggregateVersionConflictException.java
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J";
import org.fuin.objects4j.common.MarshalInformation; import org.fuin.objects4j.common.ToExceptionCapable; import org.fuin.objects4j.vo.ValueObject; import static org.fuin.ddd4j.ddd.Ddd4JUtils.SHORT_ID_PREFIX; import java.io.Serializable; import jakarta.json.bind.annotation.JsonbProperty; import jakarta.validation...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (a...
// Path: src/main/java/org/fuin/ddd4j/ddd/Ddd4JUtils.java // public static final String SHORT_ID_PREFIX = "DDD4J"; // Path: src/main/java/org/fuin/ddd4j/ddd/AggregateVersionConflictException.java import org.fuin.objects4j.common.MarshalInformation; import org.fuin.objects4j.common.ToExceptionCapable; import org.fui...
public static final String SHORT_ID = SHORT_ID_PREFIX + "-AGGREGATE_VERSION_CONFLICT";