@Override protected final Map<String, Property> getUncachedTraits( String type ) { return inspectProperties( type ); }
public Map<String, Property> getProperties( String type ) { return getTraits( type ); }
protected final Map<String, Property> getProperties( String type ) { if ( mPropertyStyle == null ) { return Collections.emptyMap(); } return mPropertyStyle.getProperties( type ); }
private void getReversePrimaryKey(Property property, Map<String, String> attributes) { // Reverse primary key for (Property reverseProperty : getProperties(property.getType()).values()) { if (reverseProperty.isAnnotationPresent(Id.class)) { attributes.put(REVERSE_PRIMARY_KEY, reverseProperty.getName()); break; } } }
private void getCollectionReversePrimaryKey(Property property, Map<String, String> attributes) { // Reverse primary key for (Property reverseProperty : getProperties(property.getGenericType()).values()) { if (reverseProperty.isAnnotationPresent(Id.class)) { attributes.put(REVERSE_PRIMARY_KEY, reverseProperty.getName()); break; } } }
return new ValueAndDeclaredType( null, null ); return new ValueAndDeclaredType( null, type ); return new ValueAndDeclaredType( null, traverseDeclaredType ); Property property = getProperties( traverseDeclaredType ).get( name ); if ( property == null || !property.isReadable() ) { return new ValueAndDeclaredType( null, null ); traverseDeclaredType = property.getType(); return new ValueAndDeclaredType( null, traverseDeclaredType );
@Override protected void processEntity( Map<String, String> attributes, M metawidget, Object toInspect, String type, String... names ) { JexlContext context = LOCAL_CONTEXT.get(); try { context.set( THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, true, names ).getValue() ); super.processEntity( attributes, metawidget, toInspect, type, names ); } finally { // THIS_ATTRIBUTE should not be available outside of our particular evaluation context.set( THIS_ATTRIBUTE, null ); } }
@Override protected Map<String, String> inspectProperty( Property property ) throws Exception { Map<String, String> attributes = CollectionUtils.newHashMap(); // UiJspLookup UiJspLookup jspLookup = property.getAnnotation( UiJspLookup.class ); if ( jspLookup != null ) { attributes.put( JSP_LOOKUP, jspLookup.value() ); } return attributes; } }
/** * Whether to exclude the given property name when searching for properties. * <p> * This can be useful when the convention or base class define properties that are * framework-specific, and should be filtered out from 'real' business model properties. * <p> * By default, excludes 'metaClass'. * * @return true if the property should be excluded, false otherwise */ @Override protected boolean isExcludedName( String name ) { if ( "metaClass".equals( name ) ) { return true; } return super.isExcludedName( name ); }
private void getReversePrimaryKey(Property property, Map<String, String> attributes) { // Reverse primary key for (Property reverseProperty : getProperties(property.getType()).values()) { if (reverseProperty.isAnnotationPresent(Id.class)) { attributes.put(REVERSE_PRIMARY_KEY, reverseProperty.getName()); break; } } }
private void getCollectionReversePrimaryKey(Property property, Map<String, String> attributes) { // Reverse primary key for (Property reverseProperty : getProperties(property.getGenericType()).values()) { if (reverseProperty.isAnnotationPresent(Id.class)) { attributes.put(REVERSE_PRIMARY_KEY, reverseProperty.getName()); break; } } }
@Override protected void processTraits( Element entity, M metawidget, Object toInspect, String type, String... names ) { JexlContext context = LOCAL_CONTEXT.get(); try { context.set( THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, false, names ).getValue() ); super.processTraits( entity, metawidget, toInspect, type, names ); } finally { // THIS_ATTRIBUTE should not be available outside of our particular evaluation context.set( THIS_ATTRIBUTE, null ); } }
@Override protected Map<String, String> inspectProperty( Property property ) throws Exception { Map<String, String> attributes = CollectionUtils.newHashMap(); // Hidden JsonIgnore jsonIgnore = property.getAnnotation( JsonIgnore.class ); if ( jsonIgnore != null && jsonIgnore.value() ) { attributes.put( HIDDEN, TRUE ); } return attributes; } }
protected final Map<String, Property> getProperties( String type ) { if ( mPropertyStyle == null ) { return Collections.emptyMap(); } return mPropertyStyle.getProperties( type ); }
@Override protected final Map<String, Property> getUncachedTraits( String type ) { return inspectProperties( type ); }
public Map<String, Property> getProperties( String type ) { return getTraits( type ); }
private void getReversePrimaryKey(Property property, Map<String, String> attributes) { // Reverse primary key for (Property reverseProperty : getProperties(property.getType()).values()) { if (reverseProperty.isAnnotationPresent(Id.class)) { attributes.put(REVERSE_PRIMARY_KEY, reverseProperty.getName()); break; } } }
private void getCollectionReversePrimaryKey(Property property, Map<String, String> attributes) { // Reverse primary key for (Property reverseProperty : getProperties(property.getGenericType()).values()) { if (reverseProperty.isAnnotationPresent(Id.class)) { attributes.put(REVERSE_PRIMARY_KEY, reverseProperty.getName()); break; } } }
private void getReversePrimaryKey(Property property, Map<String, String> attributes) { // Reverse primary key for (Property reverseProperty : getProperties(property.getType()).values()) { if (reverseProperty.isAnnotationPresent(Id.class)) { attributes.put(REVERSE_PRIMARY_KEY, reverseProperty.getName()); break; } } }
private void getCollectionReversePrimaryKey(Property property, Map<String, String> attributes) { // Reverse primary key for (Property reverseProperty : getProperties(property.getGenericType()).values()) { if (reverseProperty.isAnnotationPresent(Id.class)) { attributes.put(REVERSE_PRIMARY_KEY, reverseProperty.getName()); break; } } }