polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [01/50] polygene-java git commit: Removed access to StringIdentity constructor.
Date Mon, 10 Jul 2017 06:53:03 GMT
Repository: polygene-java
Updated Branches:
  refs/heads/es-jooq 80a19d7bf -> 9e12cd7a5


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DummyDataService.java
----------------------------------------------------------------------
diff --git a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DummyDataService.java
b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DummyDataService.java
index 346ebd6..14387d1 100644
--- a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DummyDataService.java
+++ b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/DummyDataService.java
@@ -43,7 +43,7 @@ public interface DummyDataService
     void insertInitialData()
             throws Exception;
 
-    static class Activator
+    class Activator
             extends ActivatorAdapter<ServiceReference<DummyDataService>>
     {
 
@@ -77,13 +77,13 @@ public interface DummyDataService
                     valueBuilder.prototype().string().set( "Foo bar value" );
                     valueBuilder.prototype().map().set( new HashMap() );
 
-                    EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder(
TestEntity.class, new StringIdentity( "test1" ) );
+                    EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder(
TestEntity.class, StringIdentity.fromString( "test1" ) );
                     builder.instance().name().set( "Foo bar" );
                     builder.instance().age().set( 42 );
                     builder.instance().value().set( valueBuilder.newInstance() );
                     TestEntity testEntity = builder.newInstance();
 
-                    EntityBuilder<TestEntity> builder2 = unitOfWork.newEntityBuilder(
TestEntity.class, new StringIdentity( "test2" ) );
+                    EntityBuilder<TestEntity> builder2 = unitOfWork.newEntityBuilder(
TestEntity.class, StringIdentity.fromString( "test2" ) );
                     builder2.instance().name().set( "Xyzzy" );
                     builder2.instance().age().set( 12 );
                     builder2.instance().association().set( testEntity );
@@ -98,7 +98,7 @@ public interface DummyDataService
                 }
 
                 {
-                    EntityBuilder<TestEntity2> builder = unitOfWork.newEntityBuilder(
TestEntity2.class, new StringIdentity( "test3" ) );
+                    EntityBuilder<TestEntity2> builder = unitOfWork.newEntityBuilder(
TestEntity2.class, StringIdentity.fromString( "test3" ) );
                     builder.instance().name().set( "Test3" );
                     builder.newInstance();
                 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RestTest.java
----------------------------------------------------------------------
diff --git a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RestTest.java
b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RestTest.java
index c9f5fa8..0364d18 100644
--- a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RestTest.java
+++ b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RestTest.java
@@ -111,13 +111,13 @@ public class RestTest extends AbstractPolygeneTest
         UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
-            EntityBuilder<PersonEntity> builder1 = uow.newEntityBuilder( PersonEntity.class,
new StringIdentity( "P2" ) );
+            EntityBuilder<PersonEntity> builder1 = uow.newEntityBuilder( PersonEntity.class,
StringIdentity.fromString( "P2" ) );
             PersonEntity maryDoe = builder1.instance();
             maryDoe.firstname().set( "Mary" );
             maryDoe.lastname().set( "Doe" );
             maryDoe = builder1.newInstance();
 
-            EntityBuilder<PersonEntity> builder2 = uow.newEntityBuilder( PersonEntity.class,
new StringIdentity( "P1" ) );
+            EntityBuilder<PersonEntity> builder2 = uow.newEntityBuilder( PersonEntity.class,
StringIdentity.fromString( "P1" ) );
             PersonEntity joeDoe = builder2.instance();
             joeDoe.firstname().set( "Joe" );
             joeDoe.lastname().set( "Doe" );
@@ -162,7 +162,7 @@ public class RestTest extends AbstractPolygeneTest
         UnitOfWork work = unitOfWorkFactory.newUnitOfWork();
         try
         {
-            PersonEntity entity = work.get( PersonEntity.class, new StringIdentity( "P1"
) );
+            PersonEntity entity = work.get( PersonEntity.class, StringIdentity.fromString(
"P1" ) );
             assertEquals( "FirstName not changed.", "Jack", entity.firstname().get() );
             assertEquals( "LastName not changed.", "Doe", entity.lastname().get() );
             work.complete();
@@ -185,7 +185,7 @@ public class RestTest extends AbstractPolygeneTest
             PersonEntity entity = null;
             try
             {
-                entity = work.get( PersonEntity.class, new StringIdentity( "P1" ) );
+                entity = work.get( PersonEntity.class, StringIdentity.fromString( "P1" )
);
             }
             catch( NoSuchEntityException expected )
             {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityResource.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityResource.java
b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityResource.java
index d7ab52c..8ed6fb1 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityResource.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityResource.java
@@ -97,7 +97,7 @@ public interface EntityResource<T extends HasIdentity> extends ServerResource<T>
         {
             Class entityType = parameters.entityType().get();
             String idOfEntity = parameters.id().get();
-            locator.find( entityType ).delete( new StringIdentity( idOfEntity ) );
+            locator.find( entityType ).delete( StringIdentity.fromString( idOfEntity ) );
         }
 
         @Override
@@ -137,7 +137,7 @@ public interface EntityResource<T extends HasIdentity> extends ServerResource<T>
                 throw new RuntimeException( message, e );
             }
             Reference base = parameters.request().get().getResourceRef();
-            return resourceBuilder.createRestLink( new StringIdentity( "" ), base, org.restlet.data.Method.GET
);
+            return resourceBuilder.createRestLink( StringIdentity.fromString( "" ), base,
org.restlet.data.Method.GET );
         }
 
         private Object createParametersComposite( RestForm form, Class argType )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/identity/IdentityManager.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/identity/IdentityManager.java
b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/identity/IdentityManager.java
index b4ebde6..b41df0c 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/identity/IdentityManager.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/identity/IdentityManager.java
@@ -80,10 +80,10 @@ public interface IdentityManager
             if( isIdentity( canonicalName ) )
             {
                 // This is already an ID, and we simply return it.
-                return new StringIdentity( canonicalName );
+                return StringIdentity.fromString( canonicalName );
             }
             String prefix = findPrefix( type );
-            return new StringIdentity( prefix + SEPARATOR + canonicalName );
+            return StringIdentity.fromString( prefix + SEPARATOR + canonicalName );
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/EntryPointResource.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/EntryPointResource.java
b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/EntryPointResource.java
index 053184b..274ea9e 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/EntryPointResource.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/EntryPointResource.java
@@ -80,18 +80,18 @@ public interface EntryPointResource extends ServerResource<EntryPoint>
                         RestLink link;
                         if( route.getDescription() == null )
                         {
-                            link = resourceBuilder.createRestLink( new StringIdentity( template.getPattern()
), hostRef, Method.GET );
+                            link = resourceBuilder.createRestLink( StringIdentity.fromString(
template.getPattern() ), hostRef, Method.GET );
                         }
                         else
                         {
-                            link = resourceBuilder.createRestLink( new StringIdentity( template.getPattern()
), hostRef, Method.GET, route.getDescription() );
+                            link = resourceBuilder.createRestLink( StringIdentity.fromString(
template.getPattern() ), hostRef, Method.GET, route.getDescription() );
                         }
                         entryPoints.put( route.getName(), link );
                     }
                 }
             }
             ValueBuilder<EntryPoint> builder = vbf.newValueBuilder( EntryPoint.class
);
-            builder.prototype().identity().set( new StringIdentity( "/" ) );
+            builder.prototype().identity().set( StringIdentity.fromString( "/" ) );
             builder.prototype().api().set( entryPoints );
             return builder.newInstance();
         }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/ResourceBuilder.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/ResourceBuilder.java
b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/ResourceBuilder.java
index bdf1942..eb46bac 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/ResourceBuilder.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/resource/ResourceBuilder.java
@@ -143,7 +143,7 @@ public interface ResourceBuilder
         public RestForm createNameForm( Reference base )
         {
             ValueBuilder<RestForm> builder = vbf.newValueBuilder( RestForm.class );
-            builder.prototype().link().set( createRestLink( new StringIdentity( "form" ),
base, Method.POST ) );
+            builder.prototype().link().set( createRestLink( StringIdentity.fromString( "form"
), base, Method.POST ) );
             builder.prototype().fields().set( Collections.singletonList( createFormField(
"name", FormField.TEXT ) ) );
             return builder.newInstance();
         }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceAssembler.java
----------------------------------------------------------------------
diff --git a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceAssembler.java
b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceAssembler.java
index 21ed237..31cb4bc 100644
--- a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceAssembler.java
+++ b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/DataSourceAssembler.java
@@ -70,7 +70,7 @@ public class DataSourceAssembler
     {
         module.importedServices( DataSource.class ).
             importedBy( ServiceInstanceImporter.class ).
-            setMetaInfo( new StringIdentity( dataSourceServiceId ) ).
+            setMetaInfo( StringIdentity.fromString( dataSourceServiceId ) ).
             identifiedBy( identity() ).
             visibleIn( visibility() );
         if( circuitBreaker != null )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/ExternalDataSourceAssembler.java
----------------------------------------------------------------------
diff --git a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/ExternalDataSourceAssembler.java
b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/ExternalDataSourceAssembler.java
index 2b03625..ef6b93d 100644
--- a/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/ExternalDataSourceAssembler.java
+++ b/libraries/sql/src/main/java/org/apache/polygene/library/sql/assembly/ExternalDataSourceAssembler.java
@@ -65,7 +65,7 @@ public class ExternalDataSourceAssembler
     {
         if( circuitBreaker != null )
         {
-            externalDataSource = DataSources.wrapWithCircuitBreaker( new StringIdentity(identity()),
externalDataSource, circuitBreaker );
+            externalDataSource = DataSources.wrapWithCircuitBreaker( StringIdentity.fromString(identity()),
externalDataSource, circuitBreaker );
         }
         module.importedServices( DataSource.class ).
             identifiedBy( identity() ).

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/libraries/sql/src/main/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerService.java
----------------------------------------------------------------------
diff --git a/libraries/sql/src/main/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerService.java
b/libraries/sql/src/main/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerService.java
index 777d419..e008589 100644
--- a/libraries/sql/src/main/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerService.java
+++ b/libraries/sql/src/main/java/org/apache/polygene/library/sql/jmx/DataSourceConfigurationManagerService.java
@@ -175,7 +175,7 @@ public interface DataSourceConfigurationManagerService
             EditableConfiguration( MBeanInfo info, String identity, Map<String, AccessibleObject>
propertyNames )
             {
                 this.info = info;
-                this.identity = new StringIdentity( identity );
+                this.identity = StringIdentity.fromString( identity );
                 this.propertyNames = propertyNames;
             }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext.java
----------------------------------------------------------------------
diff --git a/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext.java
b/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext.java
index dac8153..5e7043f 100644
--- a/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext.java
+++ b/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext.java
@@ -133,8 +133,8 @@ public class PayBillsContext
             {
                 // Creditor retrieval could be a use case in itself...
                 List<BalanceData> creditors = new ArrayList<BalanceData>();
-                creditors.add( uowf.currentUnitOfWork().get( CreditorRolemap.class, new StringIdentity(
"BakerAccount" ) ) );
-                creditors.add( uowf.currentUnitOfWork().get( CreditorRolemap.class, new StringIdentity(
"ButcherAccount" ) ) );
+                creditors.add( uowf.currentUnitOfWork().get( CreditorRolemap.class, StringIdentity.fromString(
"BakerAccount" ) ) );
+                creditors.add( uowf.currentUnitOfWork().get( CreditorRolemap.class, StringIdentity.fromString(
"ButcherAccount" ) ) );
                 return creditors;
             }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext2.java
----------------------------------------------------------------------
diff --git a/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext2.java
b/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext2.java
index 85009f8..9a4fe3e 100644
--- a/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext2.java
+++ b/samples/dci/src/main/java/org/apache/polygene/dci/moneytransfer/context/PayBillsContext2.java
@@ -126,8 +126,8 @@ public class PayBillsContext2
         {
             // Creditor retrieval could be a use case in itself...
             List<BalanceData> creditors = new ArrayList<>();
-            creditors.add( uowf.currentUnitOfWork().get( BalanceData.class, new StringIdentity(
"BakerAccount" ) ) );
-            creditors.add( uowf.currentUnitOfWork().get( BalanceData.class, new StringIdentity(
"ButcherAccount" ) ) );
+            creditors.add( uowf.currentUnitOfWork().get( BalanceData.class, StringIdentity.fromString(
"BakerAccount" ) ) );
+            creditors.add( uowf.currentUnitOfWork().get( BalanceData.class, StringIdentity.fromString(
"ButcherAccount" ) ) );
             return creditors;
         }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/AccountIds.java
----------------------------------------------------------------------
diff --git a/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/AccountIds.java
b/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/AccountIds.java
index 3530592..1e69a86 100644
--- a/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/AccountIds.java
+++ b/samples/dci/src/test/java/org/apache/polygene/dci/moneytransfer/test/AccountIds.java
@@ -24,9 +24,9 @@ import org.apache.polygene.api.identity.StringIdentity;
 
 public interface AccountIds
 {
-    Identity SAVINGS_ACCOUNT_ID = new StringIdentity( "SavingsAccountId" );
-    Identity CHECKING_ACCOUNT_ID = new StringIdentity( "CheckingAccountId" );
-    Identity CREDITOR_ID1 = new StringIdentity( "BakerAccount" );
-    Identity CREDITOR_ID2 = new StringIdentity( "ButcherAccount" );
+    Identity SAVINGS_ACCOUNT_ID = StringIdentity.fromString( "SavingsAccountId" );
+    Identity CHECKING_ACCOUNT_ID = StringIdentity.fromString( "CheckingAccountId" );
+    Identity CREDITOR_ID1 = StringIdentity.fromString( "BakerAccount" );
+    Identity CREDITOR_ID2 = StringIdentity.fromString( "ButcherAccount" );
 
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Forums.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Forums.java
b/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Forums.java
index 2ea7fb9..5650376 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Forums.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Forums.java
@@ -38,9 +38,9 @@ import static org.apache.polygene.api.query.QueryExpressions.templateFor;
 public interface Forums
     extends Administrators, EntityComposite
 {
-    Identity FORUMS_ID = new StringIdentity( "forums" );
+    Identity FORUMS_ID = StringIdentity.fromString( "forums" );
 
-    public Query<Forum> forums();
+    Query<Forum> forums();
 
     abstract class Mixin
         implements Forums

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Users.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Users.java
b/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Users.java
index 31861b4..42f0205 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Users.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/data/entity/Users.java
@@ -41,7 +41,7 @@ import static org.apache.polygene.api.query.QueryExpressions.templateFor;
 public interface Users
     extends EntityComposite, Events
 {
-    Identity USERS_ID = new StringIdentity( "users" );
+    Identity USERS_ID = StringIdentity.fromString( "users" );
 
     Query<User> users();
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/BoardResource.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/BoardResource.java
b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/BoardResource.java
index 164b0c8..7dd3e52 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/BoardResource.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/BoardResource.java
@@ -37,7 +37,7 @@ public class BoardResource
     public void resource( String segment )
         throws ResourceException
     {
-        selectFromManyAssociation( ObjectSelection.current().get( Forum.class ).boards(),
 new StringIdentity( segment ) );
+        selectFromManyAssociation( ObjectSelection.current().get( Forum.class ).boards(),
 StringIdentity.fromString( segment ) );
         subResource( BoardResource.class );
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumResource.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumResource.java
b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumResource.java
index 73ff700..a5c5977 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumResource.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumResource.java
@@ -37,7 +37,7 @@ public class ForumResource
     public void resource( String segment )
         throws ResourceException
     {
-        selectFromManyAssociation( ObjectSelection.current().get( Forum.class ).boards(),
new StringIdentity( segment ) );
+        selectFromManyAssociation( ObjectSelection.current().get( Forum.class ).boards(),
StringIdentity.fromString( segment ) );
         subResource( BoardResource.class );
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumsResource.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumsResource.java
b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumsResource.java
index 45e9f7b..931e5a2 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumsResource.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/rest/resource/forum/ForumsResource.java
@@ -36,7 +36,7 @@ public class ForumsResource
     public void resource( String segment )
         throws ResourceException
     {
-        select( Forum.class, new StringIdentity( segment ) );
+        select( Forum.class, StringIdentity.fromString( segment ) );
         subResource( ForumResource.class );
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/rental/src/main/java/org/apache/polygene/sample/rental/domain/dev/InitialData.java
----------------------------------------------------------------------
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/domain/dev/InitialData.java
b/samples/rental/src/main/java/org/apache/polygene/sample/rental/domain/dev/InitialData.java
index 3bb475c..1db4d19 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/domain/dev/InitialData.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/domain/dev/InitialData.java
@@ -198,7 +198,7 @@ public interface InitialData
         private RentalShop createShop( UnitOfWork uow )
             throws UnitOfWorkCompletionException
         {
-            return uow.newEntity( RentalShop.class, new StringIdentity( "SHOP" ) );
+            return uow.newEntity( RentalShop.class, StringIdentity.fromString( "SHOP" ) );
         }
 
         private void createCustomers( RentalShop shop )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/BookingPage.java
----------------------------------------------------------------------
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/BookingPage.java
b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/BookingPage.java
index 6d007f2..78815b8 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/BookingPage.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/BookingPage.java
@@ -52,7 +52,7 @@ public interface BookingPage
             Element result = dom.createElementNS( Page.XHTML, "div" );
             String bookingId = context.path();
             UnitOfWork uow = uowf.currentUnitOfWork();
-            Booking booking = uow.get( Booking.class, new StringIdentity( bookingId ) );
+            Booking booking = uow.get( Booking.class, StringIdentity.fromString( bookingId
) );
             Car car = booking.car().get();
             createChildNode( dom, result, car.model().get() );
             createChildNode( dom, result, car.licensePlate().get() );
@@ -73,7 +73,7 @@ public interface BookingPage
             Element result = dom.createElementNS( Page.XHTML, "div" );
             String bookingId = context.path();
             UnitOfWork uow = uowf.currentUnitOfWork();
-            Booking booking = uow.get( Booking.class, new StringIdentity( bookingId ) );
+            Booking booking = uow.get( Booking.class, StringIdentity.fromString( bookingId
) );
             Customer customer = booking.customer().get();
             createChildNode( dom, result, customer.name().get() );
             createChildNode( dom, result, customer.address().get().line1().get() );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/MainPage.java
----------------------------------------------------------------------
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/MainPage.java
b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/MainPage.java
index 68d868a..ebe24e6 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/MainPage.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/MainPage.java
@@ -59,7 +59,7 @@ public interface MainPage
             ArrayList<Node> nodes = new ArrayList<Node>();
             Document dom = context.dom();
             UnitOfWork uow = uowf.currentUnitOfWork();
-            RentalShop shop = uow.get( RentalShop.class, new StringIdentity( "SHOP" ) );
+            RentalShop shop = uow.get( RentalShop.class, StringIdentity.fromString( "SHOP"
) );
             for( Booking booking : shop.findAllBookings() )
             {
                 String plate = booking.car().get().licensePlate().get();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/tests/performance/src/main/java/org/apache/polygene/test/performance/entitystore/AbstractEntityStorePerformanceTest.java
----------------------------------------------------------------------
diff --git a/tests/performance/src/main/java/org/apache/polygene/test/performance/entitystore/AbstractEntityStorePerformanceTest.java
b/tests/performance/src/main/java/org/apache/polygene/test/performance/entitystore/AbstractEntityStorePerformanceTest.java
index 69d1f69..fcb9524 100644
--- a/tests/performance/src/main/java/org/apache/polygene/test/performance/entitystore/AbstractEntityStorePerformanceTest.java
+++ b/tests/performance/src/main/java/org/apache/polygene/test/performance/entitystore/AbstractEntityStorePerformanceTest.java
@@ -243,7 +243,7 @@ public abstract class AbstractEntityStorePerformanceTest
                 UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "readEntityWithComplexType
PREPARE " + bulk ) );
                 for( int i = 0; i < ITERATIONS; i++ )
                 {
-                    ComplexProduct product = uow.newEntity( ComplexProduct.class, new StringIdentity(
"product" + i ) );
+                    ComplexProduct product = uow.newEntity( ComplexProduct.class, StringIdentity.fromString(
"product" + i ) );
                     product.name().set( "Product " + i );
 
                     if( i % 1000 == 0 )
@@ -265,7 +265,7 @@ public abstract class AbstractEntityStorePerformanceTest
                 String id = rnd.nextInt( ITERATIONS ) + "";
                 for( int i = 0; i < ITERATIONS; i++ )
                 {
-                    ComplexProduct product = uow.get( ComplexProduct.class, new StringIdentity(
"product" + id ) );
+                    ComplexProduct product = uow.get( ComplexProduct.class, StringIdentity.fromString(
"product" + id ) );
                     product.name().get();
                     if( i % 100 == 0 )
                     {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
index e3bf5ce..c150d2e 100644
--- a/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
+++ b/tools/envisage/src/test/java/org/apache/polygene/envisage/school/domain/person/initialdata/SamplePersonInitialData.java
@@ -94,7 +94,7 @@ public interface SamplePersonInitialData
 
         private void createPerson( UnitOfWork uow, String personId, String firstName, String
lastName )
         {
-            EntityBuilder<Person> person = uow.newEntityBuilder( Person.class, new
StringIdentity( personId ) );
+            EntityBuilder<Person> person = uow.newEntityBuilder( Person.class, StringIdentity.fromString(
personId ) );
 
             PersonEntity.PersonState state = person.instanceFor( PersonEntity.PersonState.class
);
             state.firstName().set( firstName );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/24fe6039/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
----------------------------------------------------------------------
diff --git a/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
b/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
index 7df4c68..1608c96 100644
--- a/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
+++ b/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
@@ -35,7 +35,7 @@ import static org.junit.Assert.assertThat;
 public class HelloTest4 extends AbstractPolygeneTest
 {
 
-    public static final Identity TEST_IDENTITY = new StringIdentity( "123" );
+    public static final Identity TEST_IDENTITY = StringIdentity.fromString( "123" );
 
     @Override
     public void assemble( ModuleAssembly module )


Mime
View raw message