Methods Summary |
---|
public java.lang.String | getAccessorPropertyName(org.hibernate.EntityMode mode)
if ( mode == EntityMode.DOM4J ) {
return nodeName;
}
else {
return getName();
}
|
public java.lang.String | getCascade()
return cascade;
|
public org.hibernate.engine.CascadeStyle | getCascadeStyle()
Type type = value.getType();
if ( type.isComponentType() && !type.isAnyType() ) {
AbstractComponentType actype = (AbstractComponentType) type;
int length = actype.getSubtypes().length;
for ( int i=0; i<length; i++ ) {
if ( actype.getCascadeStyle(i)!=CascadeStyle.NONE ) return CascadeStyle.ALL;
}
return CascadeStyle.NONE;
}
else if ( cascade==null || cascade.equals("none") ) {
return CascadeStyle.NONE;
}
else {
StringTokenizer tokens = new StringTokenizer(cascade, ", ");
CascadeStyle[] styles = new CascadeStyle[ tokens.countTokens() ] ;
int i=0;
while ( tokens.hasMoreTokens() ) {
styles[i++] = CascadeStyle.getCascadeStyle( tokens.nextToken() );
}
return new CascadeStyle.MultipleCascadeStyle(styles);
}
|
public java.util.Iterator | getColumnIterator()
return value.getColumnIterator();
|
public int | getColumnSpan()
return value.getColumnSpan();
|
public PropertyGeneration | getGeneration()
return generation;
|
public org.hibernate.property.Getter | getGetter(java.lang.Class clazz)
return getPropertyAccessor(clazz).getGetter(clazz, name);
|
public MetaAttribute | getMetaAttribute(java.lang.String attributeName)
return metaAttributes==null?null:(MetaAttribute) metaAttributes.get(attributeName);
|
public java.util.Map | getMetaAttributes()
return metaAttributes;
|
public java.lang.String | getName()
return name;
|
public java.lang.String | getNodeName()
return nodeName;
|
public PersistentClass | getPersistentClass()
return persistentClass;
|
public org.hibernate.property.PropertyAccessor | getPropertyAccessor(java.lang.Class clazz)
return PropertyAccessorFactory.getPropertyAccessor( clazz, getPropertyAccessorName() );
|
public java.lang.String | getPropertyAccessorName()
return propertyAccessorName;
|
public org.hibernate.property.Setter | getSetter(java.lang.Class clazz)
return getPropertyAccessor(clazz).getSetter(clazz, name);
|
public org.hibernate.type.Type | getType()
return value.getType();
|
public Value | getValue()
return value;
|
public boolean | isBackRef()
return false;
|
public boolean | isBasicPropertyAccessor()
return propertyAccessorName==null || "property".equals(propertyAccessorName);
|
public boolean | isComposite()
return value instanceof Component;
|
public boolean | isInsertable()
// if the property mapping consists of all formulas,
// make it insertable
final boolean[] columnInsertability = value.getColumnInsertability();
return insertable && (
columnInsertability.length==0 ||
!ArrayHelper.isAllFalse(columnInsertability)
);
|
public boolean | isLazy()
if ( value instanceof ToOne ) {
// both many-to-one and one-to-one are represented as a
// Property. EntityPersister is relying on this value to
// determine "lazy fetch groups" in terms of field-level
// interception. So we need to make sure that we return
// true here for the case of many-to-one and one-to-one
// with lazy="no-proxy"
//
// * impl note - lazy="no-proxy" currently forces both
// lazy and unwrap to be set to true. The other case we
// are extremely interested in here is that of lazy="proxy"
// where lazy is set to true, but unwrap is set to false.
// thus we use both here under the assumption that this
// return is really only ever used during persister
// construction to determine the lazy property/field fetch
// groupings. If that assertion changes then this check
// needs to change as well. Partially, this is an issue with
// the overloading of the term "lazy" here...
ToOne toOneValue = ( ToOne ) value;
return toOneValue.isLazy() && toOneValue.isUnwrapProxy();
}
return lazy;
|
public boolean | isNaturalIdentifier()
return naturalIdentifier;
|
boolean | isNullable()Approximate!
return value==null || value.isNullable();
|
public boolean | isOptimisticLocked()
return optimisticLocked;
|
public boolean | isOptional()
return optional || isNullable();
|
public boolean | isPrimitive(java.lang.Class clazz)
return getGetter(clazz).getReturnType().isPrimitive();
|
public boolean | isSelectable()
return selectable;
|
public boolean | isUpdateable()
// if the property mapping consists of all formulas,
// make it non-updateable
final boolean[] columnUpdateability = value.getColumnUpdateability();
return updateable && (
//columnUpdateability.length==0 ||
!ArrayHelper.isAllFalse(columnUpdateability)
);
|
public boolean | isValid(org.hibernate.engine.Mapping mapping)
return getValue().isValid(mapping);
|
public void | setCascade(java.lang.String cascade)
this.cascade = cascade;
|
public void | setGeneration(PropertyGeneration generation)
this.generation = generation;
|
public void | setInsertable(boolean insertable)
this.insertable = insertable;
|
public void | setLazy(boolean lazy)
this.lazy=lazy;
|
public void | setMetaAttributes(java.util.Map metas)
this.metaAttributes = metas;
|
public void | setName(java.lang.String name)
this.name = name==null ? null : name.intern();
|
public void | setNaturalIdentifier(boolean naturalIdentifier)
this.naturalIdentifier = naturalIdentifier;
|
public void | setNodeName(java.lang.String nodeName)
this.nodeName = nodeName;
|
public void | setOptimisticLocked(boolean optimisticLocked)
this.optimisticLocked = optimisticLocked;
|
public void | setOptional(boolean optional)
this.optional = optional;
|
public void | setPersistentClass(PersistentClass persistentClass)
this.persistentClass = persistentClass;
|
public void | setPropertyAccessorName(java.lang.String string)
propertyAccessorName = string;
|
public void | setSelectable(boolean selectable)
this.selectable = selectable;
|
public void | setUpdateable(boolean mutable)
this.updateable = mutable;
|
public void | setValue(Value value)
this.value = value;
|
public java.lang.String | toString()
return getClass().getName() + '(" + name + ')";
|