private Serializable assembleId(Serializable oid, SharedSessionContractImplementor session) { //the owner of the association is not the owner of the id return ( Serializable ) getIdentifierType( session ).assemble( oid, session, null ); }
@Override public boolean isDirty( Object old, Object current, SharedSessionContractImplementor session) throws HibernateException { if ( isSame( old, current ) ) { return false; } Object oldid = getIdentifier( old, session ); Object newid = getIdentifier( current, session ); return getIdentifierType( session ).isDirty( oldid, newid, session ); }
@Override public Serializable disassemble( Object value, SharedSessionContractImplementor session, Object owner) throws HibernateException { if ( value == null ) { return null; } else { // cache the actual id of the object, not the value of the // property-ref, which might not be initialized Object id = ForeignKeys.getEntityIdentifierIfNotUnsaved( getAssociatedEntityName(), value, session ); if ( id == null ) { throw new AssertionFailure( "cannot cache a reference to an object with a null id: " + getAssociatedEntityName() ); } return getIdentifierType( session ).disassemble( id, session, owner ); } }
@Override public boolean isDirty( Object old, Object current, boolean[] checkable, SharedSessionContractImplementor session) throws HibernateException { if ( isAlwaysDirtyChecked() ) { return isDirty( old, current, session ); } else { if ( isSame( old, current ) ) { return false; } Object oldid = getIdentifier( old, session ); Object newid = getIdentifier( current, session ); return getIdentifierType( session ).isDirty( oldid, newid, checkable, session ); } }
private Serializable assembleId(Serializable oid, SessionImplementor session) { //the owner of the association is not the owner of the id return ( Serializable ) getIdentifierType( session ).assemble( oid, session, null ); }
private Serializable assembleId(Serializable oid, SessionImplementor session) { //the owner of the association is not the owner of the id return ( Serializable ) getIdentifierType( session ).assemble( oid, session, null ); }
private Serializable assembleId(Serializable oid, SessionImplementor session) { //the owner of the association is not the owner of the id return ( Serializable ) getIdentifierType( session ).assemble( oid, session, null ); }
public Serializable disassemble( Object value, SessionImplementor session, Object owner) throws HibernateException { if ( isNotEmbedded( session ) ) { return getIdentifierType( session ).disassemble( value, session, owner ); } if ( value == null ) { return null; } else { // cache the actual id of the object, not the value of the // property-ref, which might not be initialized Object id = ForeignKeys.getEntityIdentifierIfNotUnsaved( getAssociatedEntityName(), value, session ); if ( id == null ) { throw new AssertionFailure( "cannot cache a reference to an object with a null id: " + getAssociatedEntityName() ); } return getIdentifierType( session ).disassemble( id, session, owner ); } }
public Object assemble(Serializable oid, SessionImplementor session, Object owner) throws HibernateException { //TODO: currently broken for unique-key references (does not detect // change to unique key property of the associated object) Serializable id = (Serializable) getIdentifierType(session).assemble(oid, session, null); //the owner of the association is not the owner of the id if ( isNotEmbedded(session) ) return id; if (id==null) { return null; } else { return resolveIdentifier(id, session); } }
public boolean isDirty( Object old, Object current, SessionImplementor session) throws HibernateException { if ( isSame( old, current ) ) { return false; } Object oldid = getIdentifier( old, session ); Object newid = getIdentifier( current, session ); return getIdentifierType( session ).isDirty( oldid, newid, session ); }
public boolean isDirty( Object old, Object current, SessionImplementor session) throws HibernateException { if ( isSame( old, current ) ) { return false; } Object oldid = getIdentifier( old, session ); Object newid = getIdentifier( current, session ); return getIdentifierType( session ).isDirty( oldid, newid, session ); }
public Serializable disassemble(Object value, SessionImplementor session, Object owner) throws HibernateException { if ( isNotEmbedded(session) ) { return getIdentifierType(session).disassemble(value, session, owner); } if (value==null) { return null; } else { // cache the actual id of the object, not the value of the // property-ref, which might not be initialized Object id = ForeignKeys.getEntityIdentifierIfNotUnsaved( getAssociatedEntityName(), value, session ); if (id==null) { throw new AssertionFailure( "cannot cache a reference to an object with a null id: " + getAssociatedEntityName() ); } return getIdentifierType(session).disassemble(id, session, owner); } }
public boolean isDirty( Object old, Object current, SessionImplementor session) throws HibernateException { if ( isSame( old, current, session.getEntityMode() ) ) { return false; } Object oldid = getIdentifier( old, session ); Object newid = getIdentifier( current, session ); return getIdentifierType( session ).isDirty( oldid, newid, session ); }
public Serializable disassemble( Object value, SessionImplementor session, Object owner) throws HibernateException { if ( isNotEmbedded( session ) ) { return getIdentifierType( session ).disassemble( value, session, owner ); } if ( value == null ) { return null; } else { // cache the actual id of the object, not the value of the // property-ref, which might not be initialized Object id = ForeignKeys.getEntityIdentifierIfNotUnsaved( getAssociatedEntityName(), value, session ); if ( id == null ) { throw new AssertionFailure( "cannot cache a reference to an object with a null id: " + getAssociatedEntityName() ); } return getIdentifierType( session ).disassemble( id, session, owner ); } }
public Serializable disassemble( Object value, SessionImplementor session, Object owner) throws HibernateException { if ( isNotEmbedded( session ) ) { return getIdentifierType( session ).disassemble( value, session, owner ); } if ( value == null ) { return null; } else { // cache the actual id of the object, not the value of the // property-ref, which might not be initialized Object id = ForeignKeys.getEntityIdentifierIfNotUnsaved( getAssociatedEntityName(), value, session ); if ( id == null ) { throw new AssertionFailure( "cannot cache a reference to an object with a null id: " + getAssociatedEntityName() ); } return getIdentifierType( session ).disassemble( id, session, owner ); } }
public boolean isDirty( Object old, Object current, boolean[] checkable, SessionImplementor session) throws HibernateException { if ( isAlwaysDirtyChecked() ) { return isDirty( old, current, session ); } else { if ( isSame( old, current ) ) { return false; } Object oldid = getIdentifier( old, session ); Object newid = getIdentifier( current, session ); return getIdentifierType( session ).isDirty( oldid, newid, checkable, session ); } }
public boolean isDirty( Object old, Object current, boolean[] checkable, SessionImplementor session) throws HibernateException { if ( isAlwaysDirtyChecked() ) { return isDirty( old, current, session ); } else { if ( isSame( old, current ) ) { return false; } Object oldid = getIdentifier( old, session ); Object newid = getIdentifier( current, session ); return getIdentifierType( session ).isDirty( oldid, newid, checkable, session ); } }