private void preFilter(List<XProperty> fields, List<XProperty> getters) { Iterator<XProperty> propertyIterator = fields.iterator(); while ( propertyIterator.hasNext() ) { final XProperty property = propertyIterator.next(); if ( mustBeSkipped( property ) ) { propertyIterator.remove(); } } propertyIterator = getters.iterator(); while ( propertyIterator.hasNext() ) { final XProperty property = propertyIterator.next(); if ( mustBeSkipped( property ) ) { propertyIterator.remove(); } } }
private TreeMap<String, XProperty> initProperties(AccessType access) { //order so that property are used in the same order when binding native query TreeMap<String, XProperty> propertiesMap = new TreeMap<String, XProperty>(); List<XProperty> properties = xClass.getDeclaredProperties( access.getType() ); for ( XProperty property : properties ) { if ( mustBeSkipped( property ) ) { continue; } propertiesMap.put( property.getName(), property ); } return propertiesMap; }
private void preFilter(List<XProperty> fields, List<XProperty> getters) { Iterator<XProperty> propertyIterator = fields.iterator(); while ( propertyIterator.hasNext() ) { final XProperty property = propertyIterator.next(); if ( mustBeSkipped( property ) ) { propertyIterator.remove(); } } propertyIterator = getters.iterator(); while ( propertyIterator.hasNext() ) { final XProperty property = propertyIterator.next(); if ( mustBeSkipped( property ) ) { propertyIterator.remove(); } } }
/** * Retrieves all properties from the {@code xClass} with the specified access type. This method does not take * any jpa access rules/annotations into account yet. * * @param access The access type - {@code AccessType.FIELD} or {@code AccessType.Property} * * @return A maps of the properties with the given access type keyed against their property name */ private TreeMap<String, XProperty> initProperties(AccessType access) { if ( !( AccessType.PROPERTY.equals( access ) || AccessType.FIELD.equals( access ) ) ) { throw new IllegalArgumentException( "Access type has to be AccessType.FIELD or AccessType.Property" ); } //order so that property are used in the same order when binding native query TreeMap<String, XProperty> propertiesMap = new TreeMap<String, XProperty>(); List<XProperty> properties = xClass.getDeclaredProperties( access.getType() ); for ( XProperty property : properties ) { if ( mustBeSkipped( property ) ) { continue; } propertiesMap.put( property.getName(), property ); } return propertiesMap; }
/** * Retrieves all properties from the {@code xClass} with the specified access type. This method does not take * any jpa access rules/annotations into account yet. * * @param access The access type - {@code AccessType.FIELD} or {@code AccessType.Property} * * @return A maps of the properties with the given access type keyed against their property name */ private TreeMap<String, XProperty> initProperties(AccessType access) { if ( !( AccessType.PROPERTY.equals( access ) || AccessType.FIELD.equals( access ) ) ) { throw new IllegalArgumentException( "Access type has to be AccessType.FIELD or AccessType.Property" ); } //order so that property are used in the same order when binding native query TreeMap<String, XProperty> propertiesMap = new TreeMap<String, XProperty>(); List<XProperty> properties = xClass.getDeclaredProperties( access.getType() ); for ( XProperty property : properties ) { if ( mustBeSkipped( property ) ) { continue; } propertiesMap.put( property.getName(), property ); } return propertiesMap; }