Class BeanField

java.lang.Object
ch.autumo.commons.utils.bean.BeanField

public class BeanField extends Object
Bean field.
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
      Logger.
  • Constructor Details

    • BeanField

      public BeanField(String dbName, String beanName, Class<?> type, boolean isNullable, boolean unique, Method getterMethod, Method setterMethod)
      Constructor.
      Parameters:
      dbName - column name
      beanName - attribute name
      type - Java type
      isNullable - is nullable?
      unique - is unique?
      getterMethod - getter method
      setterMethod - setter method
  • Method Details

    • getGetterMethod

      public Method getGetterMethod()
      Get getter method.
      Returns:
      getter method.
    • getSetterMethod

      public Method getSetterMethod()
      Get setter method.
      Returns:
      setter method.
    • getDbName

      public String getDbName()
      Get DB name.
      Returns:
      DB name
    • getBeanName

      public String getBeanName()
      Get bean name.
      Returns:
      bean name
    • getType

      public Class<?> 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

      public String toString()
      Overrides:
      toString in class Object
    • serialize

      public String serialize(BeanField field) throws com.fasterxml.jackson.core.JsonProcessingException
      Serialize this field to JSON.
      Parameters:
      field - field
      Returns:
      JSON string
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - JSON processing exception