@Override public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { nullSafeSet( st, value, index, null, session ); }
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException { Serializable id; String entityName; if (value==null) { id=null; entityName=null; } else { entityName = session.bestGuessEntityName(value); id = ForeignKeys.getEntityIdentifierIfNotUnsaved(entityName, value, session); } metaType.nullSafeSet(st, entityName, index, session); identifierType.nullSafeSet(st, id, index+1, session); // metaType must be single-column type }
public void nullSafeSet(PreparedStatement st, Object value, int index, boolean[] settable, SessionImplementor session) throws HibernateException, SQLException { Serializable id; String entityName; if (value==null) { id=null; entityName=null; } else { entityName = session.bestGuessEntityName(value); id = ForeignKeys.getEntityIdentifierIfNotUnsaved(entityName, value, session); } // metaType is assumed to be single-column type if ( settable==null || settable[0] ) { metaType.nullSafeSet(st, entityName, index, session); } if (settable==null) { identifierType.nullSafeSet(st, id, index+1, session); } else { boolean[] idsettable = new boolean[ settable.length-1 ]; System.arraycopy(settable, 1, idsettable, 0, idsettable.length); identifierType.nullSafeSet(st, id, index+1, idsettable, session); } }
public void nullSafeSet(PreparedStatement st, Object value, int index, boolean[] settable, SessionImplementor session) throws HibernateException, SQLException { Serializable id; String entityName; if (value==null) { id=null; entityName=null; } else { entityName = session.bestGuessEntityName(value); id = ForeignKeys.getEntityIdentifierIfNotUnsaved(entityName, value, session); } // metaType is assumed to be single-column type if ( settable==null || settable[0] ) { metaType.nullSafeSet(st, entityName, index, session); } if (settable==null) { identifierType.nullSafeSet(st, id, index+1, session); } else { boolean[] idsettable = new boolean[ settable.length-1 ]; System.arraycopy(settable, 1, idsettable, 0, idsettable.length); identifierType.nullSafeSet(st, id, index+1, idsettable, session); } }
public void nullSafeSet(PreparedStatement st, Object value, int index, boolean[] settable, SessionImplementor session) throws HibernateException, SQLException { Serializable id; String entityName; if (value==null) { id=null; entityName=null; } else { entityName = session.bestGuessEntityName(value); id = ForeignKeys.getEntityIdentifierIfNotUnsaved(entityName, value, session); } // metaType is assumed to be single-column type if ( settable==null || settable[0] ) { metaType.nullSafeSet(st, entityName, index, session); } if (settable==null) { identifierType.nullSafeSet(st, id, index+1, session); } else { boolean[] idsettable = new boolean[ settable.length-1 ]; System.arraycopy(settable, 1, idsettable, 0, idsettable.length); identifierType.nullSafeSet(st, id, index+1, idsettable, session); } }