public boolean hasExplicitAccessStrategy() { return !explicitClassDefinedAccessType.equals( AccessType.DEFAULT ); }
public void assertTypesAreResolvable(AccessType access) { TreeMap<String, XProperty> xprops; if ( AccessType.PROPERTY.equals( access ) || AccessType.DEFAULT.equals( access ) ) { xprops = propertyAccessMap; } else { xprops = fieldAccessMap; } for ( XProperty property : xprops.values() ) { if ( !property.isTypeResolved() && !discoverTypeWithoutReflection( property ) ) { String msg = "Property " + StringHelper.qualify( xClass.getName(), property.getName() ) + " has an unbound type and no explicit target entity. Resolve this Generic usage issue" + " or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type"; throw new AnnotationException( msg ); } } }
public boolean hasExplicitAccessStrategy() { return !explicitClassDefinedAccessType.equals( AccessType.DEFAULT ); }
public boolean hasExplicitAccessStrategy() { return !explicitClassDefinedAccessType.equals( AccessType.DEFAULT ); }
/** * 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; }
private void assertTypesAreResolvable(AccessType access) { Map<String, XProperty> xprops; if ( AccessType.PROPERTY.equals( access ) || AccessType.DEFAULT.equals( access ) ) { xprops = propertyAccessMap; } else { xprops = fieldAccessMap; } for ( XProperty property : xprops.values() ) { if ( !property.isTypeResolved() && !discoverTypeWithoutReflection( property ) ) { String msg = "Property " + StringHelper.qualify( xClass.getName(), property.getName() ) + " has an unbound type and no explicit target entity. Resolve this Generic usage issue" + " or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type"; throw new AnnotationException( msg ); } } }
private void assertTypesAreResolvable(AccessType access) { Map<String, XProperty> xprops; if ( AccessType.PROPERTY.equals( access ) || AccessType.DEFAULT.equals( access ) ) { xprops = propertyAccessMap; } else { xprops = fieldAccessMap; } for ( XProperty property : xprops.values() ) { if ( !property.isTypeResolved() && !discoverTypeWithoutReflection( property ) ) { String msg = "Property " + StringHelper.qualify( xClass.getName(), property.getName() ) + " has an unbound type and no explicit target entity. Resolve this Generic usage issue" + " or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type"; throw new AnnotationException( msg ); } } }