de.uplanet.lucy.server.usermanager.ds
Class DsDbSchema

java.lang.Object
  extended by de.uplanet.lucy.server.usermanager.ds.DsDbSchema

@Scriptable
public final class DsDbSchema
extends java.lang.Object

Version:
$Revision: 86903 $

Method Summary
static de.uplanet.lucy.server.events.IServerEventListener asServerEventListener()
           
static java.util.List<DsClass> getAllDerivedClasses(DsClass p_class)
          gets a list of classes that are derived from the class (contains the given class)
static java.util.List<DsClass> getAllDerivedClasses(int p_iClassType)
          gets a list of classes that are derived from the class (contains the given class)
static java.util.List<DsClass> getAllDerivedClasses(java.lang.String p_strClassName)
          gets a list of classes that are derived from the class (contains the given class)
static java.lang.String getAttributeGuidForName(java.lang.String p_strName)
           
static java.lang.String getAttributeNameForGuid(java.lang.String p_strGuid)
           
static DsClass getDSClassDefinition(int p_iClassID)
           
static DsClass getDSClassDefinition(java.lang.String p_strClass)
           
static java.util.Map<java.lang.String,DsClass> getDSClassDefinitions()
           
static void initCache(de.uplanet.jdbc.JdbcConnection p_conn)
          Initialize the cache.
static boolean isArrayAttribute(java.lang.String p_strGuid)
          checks if the given guid is an array attribute
static boolean isDerivedFrom(DsClass p_srcClass, DsClass p_dstClass)
          returns true, when p_checkType is derived from the p_iSrcType.
static boolean isDerivedFrom(int p_iSrcType, int p_iDstType)
          returns true, when p_iDstType is derived from the p_iSrcType.
static boolean isDerivedFrom(java.lang.String p_strSrcTypeName, java.lang.String p_strDestTypeName)
          returns true, when p_checkType is derived from the p_iSrcType.
static boolean isDerivedFromContainer(DsClass p_class)
          return true if p_class is derived from a container
static boolean isDerivedFromContainer(int p_iClassId)
          return true if p_iClass is derived from a container
static boolean isDerivedFromContainer(java.lang.String p_strClass)
          return true if p_strClass is derived from a container
static boolean isDerivedFromSet(DsClass p_class)
          true if p_class is derived from a set
static boolean isDerivedFromSet(int p_iClassId)
          return true if p_class is derived from a set
static boolean isDerivedFromSet(java.lang.String p_strClass)
          return true if p_strClass is derived from a set
static boolean isDerivedFromUser(DsClass p_class)
          Check if the given class is derived from the user class.
static boolean isDerivedFromUser(int p_iClassId)
          Check if the given class is derived from the user class.
static boolean isDerivedFromUser(java.lang.String p_strClass)
          Check if the given class is derived from the user class.
static boolean isNoContainer(DsClass p_class)
          true if p_class is not derived from a container
static boolean isNoContainer(int p_iClassID)
          true if p_class is not derived from a container or a set
static boolean isNoContainer(java.lang.String p_strClass)
          true if p_strClass is not derived from a container or a set
static boolean isNoContainerOrSet(DsClass p_class)
          true if p_class is not derived from a container or a set
static boolean isNoContainerOrSet(int p_iClassID)
          true if p_iClassID is not derived from a container or a set
static boolean isNoContainerOrSet(java.lang.String p_strClass)
          true if p_strClass is not derived from a container or a set
static boolean isNoSet(DsClass p_class)
          true if p_class is not derived from a set
static boolean isNoSet(int p_iClassID)
          true if p_class is not derived from a set
static boolean isNoSet(java.lang.String p_strClass)
          true if p_strClass is not derived from a set
static java.lang.String mapClassIdToClassKey(int p_iID)
           
static int mapClassKeyToClassId(java.lang.String p_strKey)
           
static void refreshCache(de.uplanet.jdbc.JdbcConnection p_conn)
          reloads the cache.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initCache

public static void initCache(de.uplanet.jdbc.JdbcConnection p_conn)
                      throws java.sql.SQLException
Initialize the cache.

Parameters:
p_conn - The database connection
Throws:
java.sql.SQLException

refreshCache

public static void refreshCache(de.uplanet.jdbc.JdbcConnection p_conn)
                         throws java.sql.SQLException
reloads the cache.

Parameters:
p_conn - The database connection
Throws:
java.sql.SQLException

getDSClassDefinition

public static DsClass getDSClassDefinition(int p_iClassID)
Parameters:
p_iClassID - The pk value of the DSClass Table (LID)
Returns:
The class with the given id (could be null)

getDSClassDefinition

public static DsClass getDSClassDefinition(java.lang.String p_strClass)
Parameters:
p_strClass - The unique class name
Returns:
The dsclass object or null if not found.

getDSClassDefinitions

public static java.util.Map<java.lang.String,DsClass> getDSClassDefinitions()
Returns:
An unmodifiable map of class definitions.

isDerivedFrom

public static boolean isDerivedFrom(int p_iSrcType,
                                    int p_iDstType)
returns true, when p_iDstType is derived from the p_iSrcType.

Parameters:
p_iSrcType - if not exists a DsRuntimeException is thrown
p_iDstType - if not exists false is returned
Returns:
true if p_iDstType is derived from p_iSrcType.

getAllDerivedClasses

public static java.util.List<DsClass> getAllDerivedClasses(int p_iClassType)
gets a list of classes that are derived from the class (contains the given class)

Parameters:
p_iClassType - the type of the class. If no class will be found for that id an DsRuntimeException will be thrown.
Returns:
a list of derived classes, contains the src class.

getAllDerivedClasses

public static java.util.List<DsClass> getAllDerivedClasses(java.lang.String p_strClassName)
gets a list of classes that are derived from the class (contains the given class)

Parameters:
p_strClassName - the type of the class. If no class will be found for that name an IllegalArgumentException will be thrown.
Returns:
a list of derived classes, contains the src class.

getAllDerivedClasses

public static java.util.List<DsClass> getAllDerivedClasses(DsClass p_class)
gets a list of classes that are derived from the class (contains the given class)

Parameters:
p_class - the ds class.
Returns:
a list of derived classes, contains the src class.

getAttributeNameForGuid

public static java.lang.String getAttributeNameForGuid(java.lang.String p_strGuid)
Parameters:
p_strGuid - guid of the attribute (DSATTRIBUTE.STRGUID column)
Returns:
name of the attribute given by the guid, or null if not found

getAttributeGuidForName

public static java.lang.String getAttributeGuidForName(java.lang.String p_strName)
Parameters:
p_strName - name of the attribute (DSATTRIBUTE.STRNAME column)
Returns:
name of the attribute given by the guid, or null if not found

isDerivedFrom

public static boolean isDerivedFrom(java.lang.String p_strSrcTypeName,
                                    java.lang.String p_strDestTypeName)
returns true, when p_checkType is derived from the p_iSrcType.

Parameters:
p_strSrcTypeName - if null true is returned, if not exists a DsRuntimeException is thrown
p_strDestTypeName - if null or not exists then false is returned
Returns:
true if p_strDstTypeName is derived type o p_strSrcTypeName

isDerivedFrom

public static boolean isDerivedFrom(DsClass p_srcClass,
                                    DsClass p_dstClass)
returns true, when p_checkType is derived from the p_iSrcType.

Parameters:
p_srcClass - if null always true is returned
p_dstClass - if null always falseis returned
Returns:
true

isDerivedFromSet

public static boolean isDerivedFromSet(int p_iClassId)
return true if p_class is derived from a set

Parameters:
p_iClassId - The class id
Returns:
true the class is derived from a set

isDerivedFromSet

public static boolean isDerivedFromSet(java.lang.String p_strClass)
return true if p_strClass is derived from a set

Parameters:
p_strClass - The class type name
Returns:
true the p_strClass is derived from a set.

isDerivedFromSet

public static boolean isDerivedFromSet(DsClass p_class)
true if p_class is derived from a set

Parameters:
p_class - The class object
Returns:
true if p_class is derived from a set.

isDerivedFromContainer

public static boolean isDerivedFromContainer(int p_iClassId)
return true if p_iClass is derived from a container

Parameters:
p_iClassId - The class id
Returns:
true if derived from the container class

isDerivedFromContainer

public static boolean isDerivedFromContainer(java.lang.String p_strClass)
return true if p_strClass is derived from a container

Parameters:
p_strClass - The class type name
Returns:
true if derived from the container class

isDerivedFromContainer

public static boolean isDerivedFromContainer(DsClass p_class)
return true if p_class is derived from a container

Parameters:
p_class - The class object
Returns:
true if derived from the container class

isDerivedFromUser

public static boolean isDerivedFromUser(int p_iClassId)
Check if the given class is derived from the user class.

Parameters:
p_iClassId - The integer class identifier.
Returns:
true if the given class is derived from the user class, or false otherwise.

isDerivedFromUser

public static boolean isDerivedFromUser(java.lang.String p_strClass)
Check if the given class is derived from the user class.

Parameters:
p_strClass - The class identifier.
Returns:
true if the given class is derived from the user class, or false otherwise.

isDerivedFromUser

public static boolean isDerivedFromUser(DsClass p_class)
Check if the given class is derived from the user class.

Parameters:
p_class - The class object.
Returns:
true if the given class is derived from the user class, or false otherwise.

isNoContainer

public static boolean isNoContainer(int p_iClassID)
true if p_class is not derived from a container or a set

Parameters:
p_iClassID - The class type id
Returns:
true if not derived from a container.

isNoContainer

public static boolean isNoContainer(java.lang.String p_strClass)
true if p_strClass is not derived from a container or a set

Parameters:
p_strClass - The class type name
Returns:
true if not derived from a container

isNoContainer

public static boolean isNoContainer(DsClass p_class)
true if p_class is not derived from a container

Parameters:
p_class - The class object
Returns:
ture if not derived from a container

isNoSet

public static boolean isNoSet(int p_iClassID)
true if p_class is not derived from a set

Parameters:
p_iClassID - The class type id
Returns:
true if not derived for a set

isNoSet

public static boolean isNoSet(java.lang.String p_strClass)
true if p_strClass is not derived from a set

Parameters:
p_strClass - The class type name
Returns:
true if class not derived from a set

isNoSet

public static boolean isNoSet(DsClass p_class)
true if p_class is not derived from a set

Parameters:
p_class - The class object
Returns:
true if not derived from a set

isNoContainerOrSet

public static boolean isNoContainerOrSet(int p_iClassID)
true if p_iClassID is not derived from a container or a set

Parameters:
p_iClassID - The class type id
Returns:
true if not derived form a container or set

isNoContainerOrSet

public static boolean isNoContainerOrSet(java.lang.String p_strClass)
true if p_strClass is not derived from a container or a set

Parameters:
p_strClass - The class type name
Returns:
true if not derived from a container or set

isNoContainerOrSet

public static boolean isNoContainerOrSet(DsClass p_class)
true if p_class is not derived from a container or a set

Parameters:
p_class - The class object
Returns:
true if not derived from a container or set

isArrayAttribute

public static boolean isArrayAttribute(java.lang.String p_strGuid)
checks if the given guid is an array attribute

Parameters:
p_strGuid - unique identifier
Returns:
true if the attribute of the guid is an array attribute otherwise false

mapClassKeyToClassId

public static int mapClassKeyToClassId(java.lang.String p_strKey)
Parameters:
p_strKey - The class type name (must be valid otherwise an DsRuntime exception will be thrown).
Returns:
The class type id.

mapClassIdToClassKey

public static java.lang.String mapClassIdToClassKey(int p_iID)
Parameters:
p_iID - The class type id (must be valid otherwise an DsRuntime exception will be thrown).
Returns:
The class type name.

asServerEventListener

public static de.uplanet.lucy.server.events.IServerEventListener asServerEventListener()
Returns:
Server event listener


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.