:tutorials:whats-an-object refine snippets

Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/4963baf4
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/4963baf4
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/4963baf4

Branch: refs/heads/develop
Commit: 4963baf4811b1b55abeaa00bc5df01cef2e21756
Parents: 33f8825
Author: Paul Merlin <[email protected]>
Authored: Mon May 15 09:18:38 2017 +0200
Committer: Paul Merlin <[email protected]>
Committed: Mon May 15 09:18:38 2017 +0200

----------------------------------------------------------------------
 .../polygene/demo/intro/WhatsAnObjectDocs.java  | 24 ++++++++------------
 1 file changed, 9 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/4963baf4/tutorials/introduction/src/main/java/org/apache/polygene/demo/intro/WhatsAnObjectDocs.java
----------------------------------------------------------------------
diff --git 
a/tutorials/introduction/src/main/java/org/apache/polygene/demo/intro/WhatsAnObjectDocs.java
 
b/tutorials/introduction/src/main/java/org/apache/polygene/demo/intro/WhatsAnObjectDocs.java
index ed7ffc0..ee09196 100644
--- 
a/tutorials/introduction/src/main/java/org/apache/polygene/demo/intro/WhatsAnObjectDocs.java
+++ 
b/tutorials/introduction/src/main/java/org/apache/polygene/demo/intro/WhatsAnObjectDocs.java
@@ -20,7 +20,7 @@
 package org.apache.polygene.demo.intro;
 
 import org.apache.polygene.api.entity.EntityBuilder;
-import org.apache.polygene.api.entity.EntityComposite;
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
@@ -28,24 +28,21 @@ import org.apache.polygene.api.unitofwork.UnitOfWork;
 public class WhatsAnObjectDocs
 {
         // START SNIPPET: wo1
-        @Mixins(SomeMixin.class)
-        interface MyEntity
-                extends Some, Other, EntityComposite
-        {}
-// END SNIPPET: wo1
+        @Mixins( SomeMixin.class )
+        interface MyEntity extends Some, Other, HasIdentity {}
+        // END SNIPPET: wo1
 
         // START SNIPPET: wo2
         interface SomeState
         {
             Property<String> someProperty();
         }
-// END SNIPPET: wo2
+        // END SNIPPET: wo2
 
         // START SNIPPET: wo3
-        interface MyState
-                extends SomeState, OtherState //, ...
+        interface MyState extends SomeState, OtherState //, ...
         {}
-// END SNIPPET: wo3
+        // END SNIPPET: wo3
 
 
         abstract class SomeMixin implements Some
@@ -61,18 +58,15 @@ public class WhatsAnObjectDocs
         {}
 
         {
-
             UnitOfWork uow = null;
-// START SNIPPET: wo4
+            // START SNIPPET: wo4
             EntityBuilder<MyEntity> builder = 
uow.newEntityBuilder(MyEntity.class);
             MyState state = builder.instanceFor(MyState.class);
 
             //... init state ...
 
             MyEntity instance = builder.newInstance();
-// END SNIPPET: wo4        }
-
-
+            // END SNIPPET: wo4
         }
 
     }

Reply via email to