public class Categories
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ORDER_BY_ID |
static int |
ORDER_BY_LOCALE_NAME |
static int |
ORDER_BY_NEUTRAL_NAME |
static int |
ORDER_BY_NONE |
Constructor and Description |
---|
Categories() |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clear root categories cache.
|
static void |
expand(JDCConnection oConn,
java.lang.String sRootCategoryId)
Expand Category Childs into k_cat_expand table
|
Category |
forDomain(JDCConnection oConn,
int iDomain)
Get root category for a given Domain
The root Category for a Domain will be the one such that nm_category=nm_domain
|
DBSubset |
getChildsNamed(JDCConnection oConn,
java.lang.String idParent,
java.lang.String sLanguage,
int iOrderBy)
Get first level childs for a given category.
|
DBSubset |
getRoots(JDCConnection oConn)
Get root categories as a DBSubset.
|
int |
getRootsCount()
Get root categories count.
|
DBSubset |
getRootsNamed(JDCConnection oConn,
java.lang.String sLanguage,
int iOrderBy)
Get Root Caetgories and their names as a DBSubset
Categories not having any translation at k_cat_labels will not be retrieved.
|
Category |
getSharedFilesCategoryForDomain(JDCConnection oConn,
int iDomain)
Get shared files category for a given Domain
The shared files Category for a Domain will be the child of the root category for domain
which nm_category = nm_domain + "_SHARED"
|
static int |
removeObject(JDCConnection oConn,
java.lang.String sIdObject,
int iClassId)
Remove object from all Categories
Removing an object from a Category does not delete it.
|
public static final int ORDER_BY_NONE
public static final int ORDER_BY_ID
public static final int ORDER_BY_NEUTRAL_NAME
public static final int ORDER_BY_LOCALE_NAME
public void clearCache()
public static void expand(JDCConnection oConn, java.lang.String sRootCategoryId) throws java.sql.SQLException
Expand Category Childs into k_cat_expand table
oConn
- Database ConnectionsRootCategoryId
- GUID of Category to expand.java.sql.SQLException
public Category forDomain(JDCConnection oConn, int iDomain) throws java.sql.SQLException
Get root category for a given Domain
The root Category for a Domain will be the one such that nm_category=nm_domainoConn
- Database ConnectioniDomain
- Domain Numeric Identifierjava.sql.SQLException
public Category getSharedFilesCategoryForDomain(JDCConnection oConn, int iDomain) throws java.sql.SQLException
Get shared files category for a given Domain
The shared files Category for a Domain will be the child of the root category for domain which nm_category = nm_domain + "_SHARED"oConn
- Database ConnectioniDomain
- Domain Numeric Identifierjava.sql.SQLException
public DBSubset getRoots(JDCConnection oConn) throws java.sql.SQLException
Get root categories as a DBSubset.
Root categories are those present at k_cat_root table.oConn
- Database Connectionjava.sql.SQLException
public int getRootsCount() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- If getRoots() or getRootsNamed() have not
been called prior to getRootsCount()public DBSubset getRootsNamed(JDCConnection oConn, java.lang.String sLanguage, int iOrderBy) throws java.sql.SQLException
Get Root Caetgories and their names as a DBSubset
Categories not having any translation at k_cat_labels will not be retrieved.oConn
- Database ConnectionsLanguage
- Language for category label retrieval.iOrderBy
- Column for order by { ORDER_BY_NONE, ORDER_BY_NEUTRAL_NAME, ORDER_BY_LOCALE_NAME }gu_category | nm_category | tr_category | nm_icon | nm_icon2 |
Category GUID | Category Internal Name | Category Translated Label | Icon for Closed Folder | Icon for Opened Folder |
java.sql.SQLException
public DBSubset getChildsNamed(JDCConnection oConn, java.lang.String idParent, java.lang.String sLanguage, int iOrderBy) throws java.sql.SQLException
Get first level childs for a given category.
Categories not having any translation at k_cat_labels will not be retrieved.oConn
- Database ConnectionidParent
- Parent CategorysLanguage
- Language for label retrievaliOrderBy
- Column for order by { ORDER_BY_NONE, ORDER_BY_NEUTRAL_NAME, ORDER_BY_LOCALE_NAME }gu_category | nm_category | tr_category | nm_icon | nm_icon2 |
Category GUID | Category Internal Name | Category Translated Label | Icon for Closed Folder | Icon for Opened Folder |
java.sql.SQLException
public static int removeObject(JDCConnection oConn, java.lang.String sIdObject, int iClassId) throws java.sql.SQLException
Remove object from all Categories
Removing an object from a Category does not delete it.oConn
- Database ConnectionsIdObject
- Object GUIDiClassId
- Object Class Numeric Identifierjava.sql.SQLException