Class NestedAttributeUtils
- java.lang.Object
-
- de.hybris.platform.chinesetaxinvoicebackoffice.renderers.NestedAttributeUtils
-
public class NestedAttributeUtils extends java.lang.ObjectContains common methods to the various nested attribute renderers.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFIRST_TOKENstatic java.lang.StringGETTERstatic java.lang.StringSECOND_TOKEN
-
Constructor Summary
Constructors Constructor Description NestedAttributeUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetNameOfClassWithoutModel(java.lang.Object object)Obtain the name of the class that the object belongs to, but without the "Model" at the end.java.lang.ObjectgetNestedObject(java.lang.Object object, java.lang.String propertyName)Retrieve the instance of an attribute of an object.java.lang.StringpropertyNameToGetter(java.lang.String propertyName)Convert a string representing an attribute name to the name of a getter method.java.util.Map<java.lang.String,java.lang.String>splitQualifier(java.lang.String qualifier)Splits a qualifier for a nested attribute (ex.
-
-
-
Field Detail
-
FIRST_TOKEN
public static final java.lang.String FIRST_TOKEN
- See Also:
- Constant Field Values
-
SECOND_TOKEN
public static final java.lang.String SECOND_TOKEN
- See Also:
- Constant Field Values
-
GETTER
public static final java.lang.String GETTER
- See Also:
- Constant Field Values
-
-
Method Detail
-
propertyNameToGetter
public java.lang.String propertyNameToGetter(java.lang.String propertyName)
Convert a string representing an attribute name to the name of a getter method.
-
splitQualifier
public java.util.Map<java.lang.String,java.lang.String> splitQualifier(java.lang.String qualifier) throws InvalidNestedAttributeExceptionSplits a qualifier for a nested attribute (ex. product.name) into a map to retrieve the two tokens.- Throws:
InvalidNestedAttributeException
-
getNestedObject
public java.lang.Object getNestedObject(java.lang.Object object, java.lang.String propertyName) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException, InvalidNestedAttributeExceptionRetrieve the instance of an attribute of an object.- Throws:
java.lang.IllegalAccessExceptionjava.lang.IllegalArgumentExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodExceptionjava.lang.SecurityExceptionInvalidNestedAttributeException
-
getNameOfClassWithoutModel
public java.lang.String getNameOfClassWithoutModel(java.lang.Object object)
Obtain the name of the class that the object belongs to, but without the "Model" at the end.
-
-