public void testProperCallbacks() { ValueVisitor vv = new ValueVisitorValidator(); new Any(new Table()).accept(vv); new Array(new RootClass()).accept(vv); new Bag(new RootClass()).accept(vv); new Component(new RootClass()).accept(vv); new DependantValue(null,null).accept(vv); new IdentifierBag(null).accept(vv); new List(null).accept(vv); new ManyToOne(null).accept(vv); new Map(null).accept(vv); new OneToMany(null).accept(vv); new OneToOne(null, new RootClass() ).accept(vv); new PrimitiveArray(null).accept(vv); new Set(null).accept(vv); new SimpleValue().accept(vv); }
public List<String> getNestedInnerComponentNames(String parentClassname, String topLevelComponentName, String nestedComponentName, String innerComponentNamePrefix) { List<String> names = new ArrayList<String>(); PersistentClass parent = configuration.getClassMapping(parentClassname); Property topLevelProperty = parent.getProperty(topLevelComponentName); Component topLevelComponent = (Component) topLevelProperty.getValue(); Property nestedProperty = topLevelComponent.getProperty(nestedComponentName); Set nestedSet = (Set) nestedProperty.getValue(); Component nestedComponent = (Component) nestedSet.getElement(); Iterator<?> propertyIter = nestedComponent.getPropertyIterator(); while (propertyIter.hasNext()) { Property prop = (Property) propertyIter.next(); if (prop.getName().startsWith(innerComponentNamePrefix)) { names.add(prop.getName()); } } return names; }
public Collection create(Element node, String path, PersistentClass owner, Mappings mappings, java.util.Map inheritedMetas) throws MappingException { Set set = new Set( mappings, owner ); bindCollection( node, set, owner.getEntityName(), path, mappings, inheritedMetas ); return set; }
public Collection create(Element node, String path, PersistentClass owner, Mappings mappings, java.util.Map inheritedMetas) throws MappingException { Set set = new Set( owner ); bindCollection( node, set, owner.getEntityName(), path, mappings, inheritedMetas ); return set; }
public Object accept(Set set) { return validate(Set.class, set); }