Methods Summary |
---|
protected void | addTuplizer(org.hibernate.EntityMode entityMode, Tuplizer tuplizer)
tuplizers.put( entityMode, tuplizer );
|
public Tuplizer | getTuplizer(org.hibernate.EntityMode entityMode)Locate the tuplizer contained within this mapping which is responsible
for the given entity-mode. If no such tuplizer is defined on this
mapping, then an exception is thrown.
Tuplizer tuplizer = getTuplizerOrNull( entityMode );
if ( tuplizer == null ) {
throw new HibernateException( "No tuplizer found for entity-mode [" + entityMode + "]");
}
return tuplizer;
|
public Tuplizer | getTuplizerOrNull(org.hibernate.EntityMode entityMode)Locate the contained tuplizer responsible for the given entity-mode. If
no such tuplizer is defined on this mapping, then return null.
return ( Tuplizer ) tuplizers.get( entityMode );
|
public org.hibernate.EntityMode | guessEntityMode(java.lang.Object object)Given a supposed instance of an entity/component, guess its entity mode.
Iterator itr = tuplizers.entrySet().iterator();
while( itr.hasNext() ) {
Map.Entry entry = ( Map.Entry ) itr.next();
Tuplizer tuplizer = ( Tuplizer ) entry.getValue();
if ( tuplizer.isInstance( object ) ) {
return ( EntityMode ) entry.getKey();
}
}
return null;
|