protected boolean visitCollectionsBeforeSave( Object entity, Serializable id, Object[] values, Type[] types, EventSource source) { WrapVisitor visitor = new WrapVisitor( source ); // substitutes into values by side-effect visitor.processEntityPropertyValues( values, types ); return visitor.isSubstitutionRequired(); }
@Override void process(Object object, EntityPersister persister) throws HibernateException { final Object[] values = persister.getPropertyValues( object ); final Type[] types = persister.getPropertyTypes(); processEntityPropertyValues( values, types ); if ( isSubstitutionRequired() ) { persister.setPropertyValues( object, values ); } } }
private boolean wrapCollections( EventSource session, EntityPersister persister, Type[] types, Object[] values ) { if ( persister.hasCollections() ) { // wrap up any new collections directly referenced by the object // or its components // NOTE: we need to do the wrap here even if its not "dirty", // because collections need wrapping but changes to _them_ // don't dirty the container. Also, for versioned data, we // need to wrap before calling searchForDirtyCollections WrapVisitor visitor = new WrapVisitor( session ); // substitutes into values by side-effect visitor.processEntityPropertyValues( values, types ); return visitor.isSubstitutionRequired(); } else { return false; } }
protected boolean visitCollectionsBeforeSave(Object entity, Serializable id, Object[] values, Type[] types, EventSource source) { WrapVisitor visitor = new WrapVisitor( source ); // substitutes into values by side-effect visitor.processEntityPropertyValues( values, types ); return visitor.isSubstitutionRequired(); }
protected boolean visitCollectionsBeforeSave(Object entity, Serializable id, Object[] values, Type[] types, EventSource source) { WrapVisitor visitor = new WrapVisitor( source ); // substitutes into values by side-effect visitor.processEntityPropertyValues( values, types ); return visitor.isSubstitutionRequired(); }
protected boolean visitCollectionsBeforeSave( Object entity, Object id, Object[] values, List<PersistentAttributeDescriptor> attributes, EventSource source) { WrapVisitor visitor = new WrapVisitor( source ); // substitutes into values by side-effect visitor.processEntityPropertyValues( values, attributes ); return visitor.isSubstitutionRequired(); }
@Override void process(Object object, EntityTypeDescriptor descriptor) throws HibernateException { final Object[] values = descriptor.getPropertyValues( object ); final List<PersistentAttributeDescriptor> persistentAttributes = descriptor.getPersistentAttributes(); processEntityPropertyValues( values, persistentAttributes ); if ( isSubstitutionRequired() ) { descriptor.setPropertyValues( object, values ); } } }
private boolean wrapCollections( EventSource session, EntityPersister persister, Type[] types, Object[] values ) { if ( persister.hasCollections() ) { // wrap up any new collections directly referenced by the object // or its components // NOTE: we need to do the wrap here even if its not "dirty", // because collections need wrapping but changes to _them_ // don't dirty the container. Also, for versioned data, we // need to wrap before calling searchForDirtyCollections WrapVisitor visitor = new WrapVisitor(session); // substitutes into values by side-effect visitor.processEntityPropertyValues(values, types); return visitor.isSubstitutionRequired(); } else { return false; } }
private boolean wrapCollections( EventSource session, EntityTypeDescriptor entityDescriptor, List<PersistentAttributeDescriptor> persistentAttributes, Object[] values) { if ( !entityDescriptor.hasCollections() ) { return false; } // wrap up any new collections directly referenced by the object // or its components // NOTE: we need to do the wrap here even if its not "dirty", // because collections need wrapping but changes to _them_ // don't dirty the container. Also, for versioned data, we // need to wrap before calling searchForDirtyCollections WrapVisitor visitor = new WrapVisitor( session ); // substitutes into values by side-effect visitor.processEntityPropertyValues( values, persistentAttributes ); return visitor.isSubstitutionRequired(); }
@Override void process(Object object, EntityPersister persister) throws HibernateException { final Object[] values = persister.getPropertyValues( object ); final Type[] types = persister.getPropertyTypes(); processEntityPropertyValues( values, types ); if ( isSubstitutionRequired() ) { persister.setPropertyValues( object, values ); } } }
@Override void process(Object object, EntityPersister persister) throws HibernateException { final Object[] values = persister.getPropertyValues( object ); final Type[] types = persister.getPropertyTypes(); processEntityPropertyValues( values, types ); if ( isSubstitutionRequired() ) { persister.setPropertyValues( object, values ); } } }
private boolean wrapCollections( EventSource session, EntityPersister persister, Type[] types, Object[] values ) { if ( persister.hasCollections() ) { // wrap up any new collections directly referenced by the object // or its components // NOTE: we need to do the wrap here even if its not "dirty", // because collections need wrapping but changes to _them_ // don't dirty the container. Also, for versioned data, we // need to wrap before calling searchForDirtyCollections WrapVisitor visitor = new WrapVisitor(session); // substitutes into values by side-effect visitor.processEntityPropertyValues(values, types); return visitor.isSubstitutionRequired(); } else { return false; } }