Class QueryHelper

java.lang.Object
rife.database.queries.QueryHelper

public abstract class QueryHelper extends Object
  • Constructor Details

    • QueryHelper

      public QueryHelper()
  • Method Details

    • getColumnName

      public static String getColumnName(Constrained constrained, String propertyName)
      Retrieves the database column name that a bean property maps to.

      This method will return the explicit column name when the property has been constrained with one, otherwise the column name is simply the property name. This makes it possible to use column names that can't be expressed as bean property names.

      Parameters:
      constrained - the constrained bean to look the property up in; or null when the bean isn't constrained
      propertyName - the name of the bean property
      Returns:
      the column name to use for the property
      Since:
      1.10
    • getBeanPropertyNames

      public static Set<String> getBeanPropertyNames(Class beanClass, String[] excludedFields) throws DbQueryException
      Throws:
      DbQueryException
    • getBeanPropertyValues

      public static Map<String,String> getBeanPropertyValues(Object bean, String[] includedFields, String[] excludedFields, Datasource datasource) throws DbQueryException
      Throws:
      DbQueryException
    • getBeanPropertyTypes

      public static Map<String,Class> getBeanPropertyTypes(Class beanClass, String[] includedFields, String[] excludedFields) throws DbQueryException
      Throws:
      DbQueryException