Package ch.autumo.commons.utils.bean
Class BeanField
java.lang.Object
ch.autumo.commons.utils.bean.BeanField
Bean field.
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOGLogger.
-
-
Constructor Details
-
BeanField
public BeanField(String dbName, String beanName, Class<?> type, boolean isNullable, boolean unique, Method getterMethod, Method setterMethod) Constructor.- Parameters:
dbName- column namebeanName- attribute nametype- Java typeisNullable- is nullable?unique- is unique?getterMethod- getter methodsetterMethod- setter method
-
-
Method Details
-
getGetterMethod
Get getter method.- Returns:
- getter method.
-
getSetterMethod
Get setter method.- Returns:
- setter method.
-
getDbName
Get DB name.- Returns:
- DB name
-
getBeanName
Get bean name.- Returns:
- bean name
-
getType
Get type.- Returns:
- type
-
isUnique
public boolean isUnique()Is unique?- Returns:
- true if so
-
isNullable
public boolean isNullable()Is nullable?- Returns:
- true if so
-
toString
-
serialize
Serialize this field to JSON.- Parameters:
field- field- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- JSON processing exception
-