PropertyValue redValue = new StringPropertyValue( "red" );
PropertyValue lonliestNumberValue = new IntegerPropertyValue( 1 );
Long id;
PropertySet ps = new PropertySet( "my properties" );
ps.setSomeSpecificProperty( redValue );
ps.getGeneralProperties().put( "the lonliest number", lonliestNumberValue );
ps.getGeneralProperties().put( "i like", new StringPropertyValue( "pina coladas" ) );
ps.getGeneralProperties().put( "i also like", new StringPropertyValue( "getting caught in the rain" ) );
s.save( ps );
s.getTransaction().commit();
id = ps.getId();
s.clear();
s.beginTransaction();
// TODO : setEntity() currently will not work here, but that would be *very* nice
// does not work because the corresponding EntityType is then used as the "bind type" rather