Method from org.springframework.orm.hibernate.support.AbstractLobType Detail: |
public Object deepCopy(Object value) throws HibernateException {
return value;
}
This implementation returns the passed-in value as-is. |
public boolean equals(Object x,
Object y) throws HibernateException {
return EqualsHelper.equals(x, y);
}
This implementation delegates to the Hibernate EqualsHelper. |
public boolean isMutable() {
return false;
}
This implementation returns false. |
public final Object nullSafeGet(ResultSet rs,
String[] names,
Object owner) throws HibernateException, SQLException {
if (this.lobHandler == null) {
throw new IllegalStateException("No LobHandler found for configuration - " +
"lobHandler property must be set on LocalSessionFactoryBean");
}
try {
return nullSafeGetInternal(rs, rs.findColumn(names[0]), this.lobHandler);
}
catch (IOException ex) {
throw new HibernateException("I/O errors during LOB access", ex);
}
}
This implementation delegates to nullSafeGetInternal,
passing in the LobHandler of this type. |
abstract protected Object nullSafeGetInternal(ResultSet rs,
int index,
LobHandler lobHandler) throws SQLException, IOException, HibernateException
Template method to extract a value from the given result set. |
public final void nullSafeSet(PreparedStatement st,
Object value,
int index) throws HibernateException, SQLException {
if (this.lobHandler == null) {
throw new IllegalStateException("No LobHandler found for configuration - " +
"lobHandler property must be set on LocalSessionFactoryBean");
}
LobCreator lobCreator = this.lobHandler.getLobCreator();
try {
nullSafeSetInternal(st, index, value, lobCreator);
}
catch (IOException ex) {
throw new HibernateException("I/O errors during LOB access", ex);
}
if (TransactionSynchronizationManager.isSynchronizationActive()) {
logger.debug("Registering Spring transaction synchronization for Hibernate LOB type");
TransactionSynchronizationManager.registerSynchronization(
new SpringLobCreatorSynchronization(lobCreator));
}
else {
if (this.jtaTransactionManager != null) {
try {
int jtaStatus = this.jtaTransactionManager.getStatus();
if (jtaStatus == Status.STATUS_ACTIVE || jtaStatus == Status.STATUS_MARKED_ROLLBACK) {
logger.debug("Registering JTA transaction synchronization for Hibernate LOB type");
this.jtaTransactionManager.getTransaction().registerSynchronization(
new JtaLobCreatorSynchronization(lobCreator));
return;
}
}
catch (Exception ex) {
throw new DataAccessResourceFailureException(
"Could not register synchronization with JTA TransactionManager", ex);
}
}
throw new IllegalStateException("Active Spring transaction synchronization or active " +
"JTA transaction with 'jtaTransactionManager' on LocalSessionFactoryBean required");
}
}
This implementation delegates to nullSafeSetInternal,
passing in a transaction-synchronized LobCreator for the
LobHandler of this type. |
abstract protected void nullSafeSetInternal(PreparedStatement ps,
int index,
Object value,
LobCreator lobCreator) throws SQLException, IOException, HibernateException
Template method to set the given parameter value on the given statement. |