Methods Summary |
---|
protected org.hibernate.tuple.Instantiator | buildInstantiator(org.hibernate.mapping.PersistentClass persistentClass)
return new Dom4jInstantiator( persistentClass );
|
private org.hibernate.property.PropertyAccessor | buildPropertyAccessor(org.hibernate.mapping.Property mappedProperty)
if ( mappedProperty.isBackRef() ) {
return mappedProperty.getPropertyAccessor(null);
}
else {
return PropertyAccessorFactory.getDom4jPropertyAccessor(
mappedProperty.getNodeName(),
mappedProperty.getType(),
getEntityMetamodel().getSessionFactory()
);
}
|
protected org.hibernate.property.Getter | buildPropertyGetter(org.hibernate.mapping.Property mappedProperty, org.hibernate.mapping.PersistentClass mappedEntity)
return buildPropertyAccessor(mappedProperty).getGetter( null, mappedProperty.getName() );
|
protected org.hibernate.property.Setter | buildPropertySetter(org.hibernate.mapping.Property mappedProperty, org.hibernate.mapping.PersistentClass mappedEntity)
return buildPropertyAccessor(mappedProperty).getSetter( null, mappedProperty.getName() );
|
protected org.hibernate.proxy.ProxyFactory | buildProxyFactory(org.hibernate.mapping.PersistentClass mappingInfo, org.hibernate.property.Getter idGetter, org.hibernate.property.Setter idSetter)
HashSet proxyInterfaces = new HashSet();
proxyInterfaces.add( HibernateProxy.class );
proxyInterfaces.add( Element.class );
ProxyFactory pf = new Dom4jProxyFactory();
try {
pf.postInstantiate(
getEntityName(),
Element.class,
proxyInterfaces,
null,
null,
mappingInfo.hasEmbeddedIdentifier() ?
(AbstractComponentType) mappingInfo.getIdentifier().getType() :
null
);
}
catch ( HibernateException he ) {
log.warn( "could not create proxy factory for:" + getEntityName(), he );
pf = null;
}
return pf;
|
public java.lang.Class | getConcreteProxyClass()
return Element.class;
|
public org.hibernate.EntityMode | getEntityMode()
return EntityMode.DOM4J;
|
public java.io.Serializable | getIdentifier(java.lang.Object entityOrId)
if (entityOrId instanceof Element) {
return super.getIdentifier(entityOrId);
}
else {
//it was not embedded, so the argument is just an id
return (Serializable) entityOrId;
}
|
public java.lang.Class | getMappedClass()
return Element.class;
|
public boolean | isInstrumented()
return false;
|