Methods Summary |
---|
public java.lang.Object | accept(ValueVisitor visitor)
return visitor.accept(this);
|
public void | addColumn(Column column)
throw new UnsupportedOperationException("Cant add a column to a component");
|
public void | addProperty(Property p)
properties.add(p);
|
public void | addTuplizer(org.hibernate.EntityMode entityMode, java.lang.String implClassName)
if ( tuplizerImpls == null ) {
tuplizerImpls = new HashMap();
}
tuplizerImpls.put( entityMode, implClassName );
|
private org.hibernate.type.Type | buildType()
// TODO : temporary initial step towards HHH-1907
ComponentMetamodel metamodel = new ComponentMetamodel( this );
if ( isEmbedded() ) {
return new EmbeddedComponentType( metamodel );
}
else {
return new ComponentType( metamodel );
}
|
public boolean[] | getColumnInsertability()
boolean[] result = new boolean[ getColumnSpan() ];
Iterator iter = getPropertyIterator();
int i=0;
while ( iter.hasNext() ) {
Property prop = (Property) iter.next();
boolean[] chunk = prop.getValue().getColumnInsertability();
if ( prop.isInsertable() ) {
System.arraycopy(chunk, 0, result, i, chunk.length);
}
i+=chunk.length;
}
return result;
|
public java.util.Iterator | getColumnIterator()
Iterator[] iters = new Iterator[ getPropertySpan() ];
Iterator iter = getPropertyIterator();
int i=0;
while ( iter.hasNext() ) {
iters[i++] = ( (Property) iter.next() ).getColumnIterator();
}
return new JoinedIterator(iters);
|
public int | getColumnSpan()
int n=0;
Iterator iter = getPropertyIterator();
while ( iter.hasNext() ) {
Property p = (Property) iter.next();
n+= p.getColumnSpan();
}
return n;
|
public boolean[] | getColumnUpdateability()
boolean[] result = new boolean[ getColumnSpan() ];
Iterator iter = getPropertyIterator();
int i=0;
while ( iter.hasNext() ) {
Property prop = (Property) iter.next();
boolean[] chunk = prop.getValue().getColumnUpdateability();
if ( prop.isUpdateable() ) {
System.arraycopy(chunk, 0, result, i, chunk.length);
}
i+=chunk.length;
}
return result;
|
public java.lang.Class | getComponentClass()
try {
return ReflectHelper.classForName(componentClassName);
}
catch (ClassNotFoundException cnfe) {
throw new MappingException("component class not found: " + componentClassName, cnfe);
}
|
public java.lang.String | getComponentClassName()
return componentClassName;
|
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 | getNodeName()
return nodeName;
|
public PersistentClass | getOwner()
return owner;
|
public java.lang.String | getParentProperty()
return parentProperty;
|
public Property | getProperty(java.lang.String propertyName)
Iterator iter = getPropertyIterator();
while ( iter.hasNext() ) {
Property prop = (Property) iter.next();
if ( prop.getName().equals(propertyName) ) {
return prop;
}
}
throw new MappingException("component property not found: " + propertyName);
|
public java.util.Iterator | getPropertyIterator()
return properties.iterator();
|
public int | getPropertySpan()
return properties.size();
|
public java.lang.String | getRoleName()
return roleName;
|
public java.lang.String | getTuplizerImplClassName(org.hibernate.EntityMode mode)
// todo : remove this once ComponentMetamodel is complete and merged
if ( tuplizerImpls == null ) {
return null;
}
return ( String ) tuplizerImpls.get( mode );
|
public java.util.Map | getTuplizerMap()
if ( tuplizerImpls == null ) {
return null;
}
return java.util.Collections.unmodifiableMap( tuplizerImpls );
|
public org.hibernate.type.Type | getType()
// added this caching as I noticed that getType() is being called multiple times...
if ( type == null ) {
type = buildType();
}
return type;
|
public boolean | hasPojoRepresentation()
return componentClassName!=null;
|
public boolean | isDynamic()
return dynamic;
|
public boolean | isEmbedded()
return embedded;
|
public boolean | isKey()
return isKey;
|
public void | setComponentClassName(java.lang.String componentClass)
this.componentClassName = componentClass;
|
public void | setDynamic(boolean dynamic)
this.dynamic = dynamic;
|
public void | setEmbedded(boolean embedded)
this.embedded = embedded;
|
public void | setKey(boolean isKey)
this.isKey = isKey;
|
public void | setMetaAttributes(java.util.Map metas)
this.metaAttributes = metas;
|
public void | setNodeName(java.lang.String nodeName)
this.nodeName = nodeName;
|
public void | setOwner(PersistentClass owner)
this.owner = owner;
|
public void | setParentProperty(java.lang.String parentProperty)
this.parentProperty = parentProperty;
|
public void | setRoleName(java.lang.String roleName)
this.roleName = roleName;
|
public void | setTypeByReflection(java.lang.String propertyClass, java.lang.String propertyName)
|
public void | setTypeUsingReflection(java.lang.String className, java.lang.String propertyName)
|
public java.lang.String | toString()
return getClass().getName() + '(" + properties.toString() + ')";
|