Class DsClass

java.lang.Object
de.uplanet.lucy.server.usermanager.ds.DsClass
All Implemented Interfaces:
de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper

public final class DsClass extends Object implements de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
Information class for a ds class object
  • Method Details

    • isContainer

      public boolean isContainer()
      Returns:
      True if class is an container or depends to a container class
    • getID

      public int getID()
      Returns:
      the iD
    • getGuid

      public String getGuid()
      Returns:
      the guid
    • getName

      public String getName()
      Returns:
      the name
    • getTablename

      public String getTablename()
      Returns:
      the tablename
    • getParent

      public DsClass getParent()
      Returns:
      the parent
    • getAttributes

      public Map<String,de.uplanet.lucy.server.usermanager.ds.DsAttribute> getAttributes()
      returns all attribute without the parent attributes
      Returns:
      the p_attribute
    • getSelectStatement

      public de.uplanet.lucy.server.usermanager.ds.IDsSelectWorker getSelectStatement(StringBuilder p_sql, String[] p_fields, boolean p_bDistinct, List<String> p_whereTables)
      Parameters:
      p_sql - The sql string
      p_fields - The fields
      p_bDistinct - distinct select
      p_whereTables - The where tables
      Returns:
      The selectins worker
    • getWorker

      public de.uplanet.lucy.server.usermanager.ds.IDsSelectWorker getWorker(HashMap<String,de.uplanet.lucy.types.UP_TYPE> p_attributes)
    • getUpdateInsertStatement

      public de.uplanet.lucy.server.usermanager.ds.IDsUpdInsWorker getUpdateInsertStatement(boolean p_bInsert, IDsRecord p_record)
      Parameters:
      p_bInsert - Insert record?
      p_record - The record to insert or update
      Returns:
      The insert / update worker
    • getRequiredAttributes

      public List<String> getRequiredAttributes()
      Returns:
      the requiredAttributes
    • getPkAttribute

      public de.uplanet.lucy.server.usermanager.ds.DsAttribute getPkAttribute()
      Returns:
      the pkAttribuite
    • getNameDescriptionSelect

      public String getNameDescriptionSelect()
      Returns:
      Select statement
    • getSqlSelectStatement

      public String getSqlSelectStatement(Map<String,String> p_fieldAliases, String... p_selectFields)
      generates the sql statement, first field will always the pk key
      Parameters:
      p_fieldAliases - Table Aliases to DsClass
      p_selectFields - Name = FieldGuid, Value used when Field not found
      Returns:
      sql statement
    • getSqlSelectStatement

      public String getSqlSelectStatement(String... p_selectfieldGuids)
      Parameters:
      p_selectfieldGuids - Field guids to select
      Returns:
      the sql statemennt
    • getAllAttributesGuids

      public Set<String> getAllAttributesGuids()
      Returns:
      all attribute guids, with the parent class guids
    • getAllAttributes

      public List<de.uplanet.lucy.server.usermanager.ds.DsAttribute> getAllAttributes()
      all attributes with the parent class attributes
      Returns:
      list of DsAttribute items
    • getSelectCountStatement

      public void getSelectCountStatement(StringBuilder p_sql)
      generates the select count(*) from tbls with the needed join. no where clause is generated here. and no special joins to the dsmember or to dsobject for the containerguid is generated here.
      Parameters:
      p_sql - StringBuilder to store the generated sql statement
    • getSelectCountStatement

      public void getSelectCountStatement(StringBuilder p_sql, List<String> p_whereTbls)
      generates the select count(*) from tbls with the needed join. no where clause is generated here. and no special joins to the dsmember or to dsobject for the containerguid is generated here.
      Parameters:
      p_sql - StringBuilder to store the generated sql statement
    • getSearchableAttributeGuids

      public Set<String> getSearchableAttributeGuids()
      returns all attibutes guids which the BSEARCHABLE column is true and is a string type
      Returns:
      list of searchable fields (DsObject.STRNAME is allways in the result set)
    • getCustomAttributeGuids

      public List<String> getCustomAttributeGuids()
      a list of guids, for the custom attributes in dsattr (bmandatory = false=
      Returns:
      unmodifieable list
    • getOrder

      public final int getOrder()
      Returns:
      the order
    • isMandatory

      public final boolean isMandatory()
      Returns:
      the mandatory
    • getType

      public final de.uplanet.lucy.server.usermanager.IDsType getType()
      Returns:
      The type @see DsDefaultType
    • getDerivedTypes

      public Set<Integer> getDerivedTypes()
      Returns:
      The derived class type ids.
    • hasAttribute

      public boolean hasAttribute(String p_strAttributeGuid)
      Parameters:
      p_strAttributeGuid - The attribute guid
      Returns:
      true if a attribute with the guid exists.
    • getLocalizedNameMap

      public Map<String,String> getLocalizedNameMap(de.uplanet.jdbc.JdbcConnection p_conn)
      Parameters:
      p_conn - The database connection
      Returns:
      Map with the localized names
    • resetLocalizedCache

      public void resetLocalizedCache()
    • getDbColumnByName

      public de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByName(String p_strName)
      Parameters:
      p_strName - The column name
      Returns:
      The column field with the guid or null if not found.
    • getDbColumnByGuid

      public de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(String p_strGUID, Map<String,DsClass> p_tblAliasToClassMap)
      Specified by:
      getDbColumnByGuid in interface de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
    • getDbColumnByGuid

      public de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(String p_strGUID)
      Specified by:
      getDbColumnByGuid in interface de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
    • getAttributeByName

      public de.uplanet.lucy.server.usermanager.ds.DsAttribute getAttributeByName(String p_strName)
      Parameters:
      p_strName - The attribute name
      Returns:
      The attribute with the given name or null if not found
    • getAttributeByGuid

      public de.uplanet.lucy.server.usermanager.ds.DsAttribute getAttributeByGuid(String p_strGUID)
      Parameters:
      p_strGUID - The attribute guid
      Returns:
      The attribute with the given guid or null if not found.
    • getAttributeByUserAppFieldGuid

      public de.uplanet.lucy.server.usermanager.ds.DsAttribute getAttributeByUserAppFieldGuid(String p_strFieldGUID)
      Parameters:
      p_strFieldGUID - The attribute field guid
      Returns:
      The attribute with the given guid or null if not found.
    • getTenantAttributes

      public List<de.uplanet.lucy.server.usermanager.ds.DsAttribute> getTenantAttributes(boolean p_bParentAttributes)
      Get tenant attributes
      Parameters:
      p_bParentAttributes - True to include the tenant attributes of parent classes.
      Returns:
      list of DsAttribute items