@SuppressWarnings({"unchecked"}) public Iterator<Property> getPropertyIterator() { return pc.getPropertyIterator(); }
@SuppressWarnings({"unchecked"}) private String searchMappedBy(PersistentClass referencedClass, Table collectionTable) { return searchMappedBy( referencedClass.getPropertyIterator(), collectionTable ); }
private void checkPropertyDuplication() throws MappingException { HashSet<String> names = new HashSet<>(); Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !names.add( prop.getName() ) ) { throw new MappingException( "Duplicate property mapping of " + prop.getName() + " found in " + getEntityName() ); } } }
public static Set<String> extractModProperties(PersistentClass persistentClass, String suffix) { final Set<String> result = new HashSet<String>(); final Iterator iterator = persistentClass.getPropertyIterator(); while ( iterator.hasNext() ) { final Property property = (Property) iterator.next(); final String propertyName = property.getName(); if ( propertyName.endsWith( suffix ) ) { result.add( propertyName ); } } return result; }
@SuppressWarnings({"unchecked"}) private String searchMappedBy(PersistentClass referencedClass, Collection collectionValue) { final Iterator<Property> assocClassProps = referencedClass.getPropertyIterator(); while ( assocClassProps.hasNext() ) { final Property property = assocClassProps.next(); if ( Tools.iteratorsContentEqual( property.getValue().getColumnIterator(), collectionValue.getKey().getColumnIterator() ) ) { return property.getName(); } } // HHH-7625 // Support ToOne relations with mappedBy that point to an @IdClass key property. return searchMappedByKey( referencedClass, collectionValue ); }
@Test public void testMapping() { PersistentClass pc = metadata().getEntityBinding( UnversionedOptimisticLockingFieldEntity.class.getName() + "_AUD" ); Iterator pi = pc.getPropertyIterator(); while ( pi.hasNext() ) { Property p = (Property) pi.next(); assert !"optLocking".equals( p.getName() ); } } }
public void validate(Mapping mapping) throws MappingException { Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !prop.isValid( mapping ) ) { throw new MappingException( "property mapping has wrong number of columns: " + StringHelper.qualify( getEntityName(), prop.getName() ) + " type: " + prop.getType().getName() ); } } checkPropertyDuplication(); checkColumnDuplication(); }
( (PersistentClass) columnOwner ).getPropertyIterator() : ( (Join) columnOwner ).getPropertyIterator(); while ( it.hasNext() ) {
Iterator testIter = persistentClass.getPropertyIterator(); List<Property> propertyList = new ArrayList<>();
Iterator properties = persistentClass.getPropertyIterator(); Class clazz = persistentClass.getMappedClass(); while ( properties.hasNext() ) {
Iterator propertyIterator = cm.getPropertyIterator(); while (propertyIterator.hasNext()) { Property element = (Property) propertyIterator.next();
( (PersistentClass) columnOwner ).getPropertyIterator() : ( (Join) columnOwner ).getPropertyIterator(); while ( it.hasNext() ) {
Iterator clsMappings = cfg.getClassMappings(); while(clsMappings.hasNext()){ PersistentClass mapping = (PersistentClass) clsMappings.next(); handleProperties(mapping.getPropertyIterator(), map); }
Ejb3Configuration hibernateConfig = new Ejb3Configuration().configure("InMemoryDatabasePersistenceUnit", null); for (Iterator<?> iterator = hibernateConfig.getClassMappings(); iterator.hasNext();) { PersistentClass clazz = (PersistentClass) iterator.next(); Iterator<?> propertyIterator = clazz.getPropertyIterator(); while (propertyIterator.hasNext()) { if (property.getType().equals(Hibernate.DOUBLE)) { Assert.fail("Raw double type found. Annotate with @Type(type = \"package.ParsedDoubleType\")\n" + "Class " + clazz + " property " + property); } } }
private void checkPropertyDuplication() throws MappingException { HashSet names = new HashSet(); Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !names.add( prop.getName() ) ) { throw new MappingException( "duplicate property mapping: " + prop.getName() ); } } }
private void checkPropertyDuplication() throws MappingException { HashSet<String> names = new HashSet<>(); Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !names.add( prop.getName() ) ) { throw new MappingException( "Duplicate property mapping of " + prop.getName() + " found in " + getEntityName() ); } } }
private void checkPropertyDuplication() throws MappingException { HashSet names = new HashSet(); Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !names.add( prop.getName() ) ) { throw new MappingException( "Duplicate property mapping of " + prop.getName() + " found in " + getEntityName()); } } }
private void checkPropertyDuplication() throws MappingException { HashSet names = new HashSet(); Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !names.add( prop.getName() ) ) { throw new MappingException( "Duplicate property mapping of " + prop.getName() + " found in " + getEntityName()); } } }
private void visitProperties(PersistentClass clazz, IssueCollector collector) { if(clazz.hasIdentifierProperty()) { this.visitProperty(clazz, clazz.getIdentifierProperty(), collector); } Iterator<?> propertyIterator = clazz.getPropertyIterator(); while ( propertyIterator.hasNext() ) { Property property = (Property) propertyIterator.next(); this.visitProperty(clazz, property, collector); } }
public Property getRecursiveProperty(String propertyPath) throws MappingException { try { return getRecursiveProperty( propertyPath, getPropertyIterator() ); } catch ( MappingException e ) { throw new MappingException( "property [" + propertyPath + "] not found on entity [" + getEntityName() + "]", e ); } }