public abstract class LscBean extends Object implements IBean, Serializable
This object mainly provides methods to store and access "attributes", i.e. named fields and their values.
This implementation ignores the case of attribute names, and uses Java Sets to store lists of values, so values must be unique and are unordered.
| Constructor and Description |
|---|
LscBean() |
| Modifier and Type | Method and Description |
|---|---|
LscBean |
clone()
Clone this Bean object.
|
LscDatasets |
datasets() |
Set<Object> |
getAttributeAsSetById(String id)
Deprecated.
|
Attribute |
getAttributeById(String id)
Deprecated.
|
String |
getAttributeFirstValueById(String id)
Deprecated.
|
Set<String> |
getAttributesNames()
Get the attributes name.
|
List<String> |
getAttributeValuesById(String id)
Get all values of an attribute from its name
|
Set<Object> |
getDatasetAsSetById(String id)
Get an attribute from its name as a Set.
|
Set<Object> |
getDatasetById(String id)
Get an dataset from its name.
|
String |
getDatasetFirstValueById(String id)
Get the first value of an attribute from its name
|
byte[] |
getDatasetsBytes() |
Set<String> |
getDatasetsNames()
Get the attributes name list.
|
List<String> |
getDatasetValuesById(String id)
Get all values of an attribute from its name
|
String |
getDistinguishedName()
Deprecated.
|
String |
getDN()
Deprecated.
|
String |
getFullDistinguishedName()
Deprecated.
|
static LscBean |
getInstance(SearchResult entry,
String baseDn,
Class<?> c)
Set a bean from an LDAP entry
|
String |
getMainIdentifier()
Default distinguished name getter.
|
void |
setAttribute(Attribute attr)
Set an attribute.
|
void |
setAttribute(String name,
Set<Object> values)
Deprecated.
|
void |
setDataset(String name,
Set<Object> values)
Set a dataset.
|
void |
setDatasets(LscDatasets datasets) |
void |
setDistinguishName(String dn)
Deprecated.
|
void |
setMainIdentifier(String id)
Default main object identifier setter.
|
static void |
setMetadata(ResultSetMetaData metaData)
Manage something there !
|
String |
toString()
Bean pretty printer.
|
public final Set<Object> getDatasetById(String id)
getDatasetById in interface IBeanid - the name@Deprecated public final Attribute getAttributeById(String id)
IBeangetAttributeById in interface IBeanid - the namepublic final Set<Object> getDatasetAsSetById(String id)
id - the name@Deprecated public final Set<Object> getAttributeAsSetById(String id)
IBeangetAttributeAsSetById in interface IBeanid - the namepublic final String getDatasetFirstValueById(String id) throws NamingException
getDatasetFirstValueById in interface IBeanid - The attribute name (case insensitive)NamingException@Deprecated public final String getAttributeFirstValueById(String id) throws NamingException
IBeangetAttributeFirstValueById in interface IBeanid - The attribute name (case insensitive)NamingExceptionpublic final List<String> getDatasetValuesById(String id) throws NamingException
id - The attribute name (case insensitive)NamingExceptionpublic final List<String> getAttributeValuesById(String id) throws NamingException
IBeangetAttributeValuesById in interface IBeanid - The attribute name (case insensitive)NamingExceptionpublic final Set<String> getDatasetsNames()
public final Set<String> getAttributesNames()
IBeangetAttributesNames in interface IBeanpublic final void setAttribute(Attribute attr)
setAttribute in interface IBeanattr - the attribute to setpublic final void setDataset(String name, Set<Object> values)
setDataset in interface IBeanname - The dataset name.values - A set of values for this dataset.@Deprecated public final void setAttribute(String name, Set<Object> values)
IBeansetAttribute in interface IBeanname - The attribute name.values - A set of values for the attribute.public final String getMainIdentifier()
getMainIdentifier in interface IBean@Deprecated public final String getDistinguishedName()
IBeangetDistinguishedName in interface IBean@Deprecated public final String getDN()
@Deprecated public final String getFullDistinguishedName()
public final void setMainIdentifier(String id)
setMainIdentifier in interface IBeanid - The main identifier to setpublic final void setDistinguishName(String dn)
IBeansetDistinguishName in interface IBeandn - The distinguishedName to setpublic final String toString()
public LscBean clone() throws CloneNotSupportedException
clone in interface IBeanclone in class ObjectCloneNotSupportedExceptionpublic static void setMetadata(ResultSetMetaData metaData)
metaData - public static LscBean getInstance(SearchResult entry, String baseDn, Class<?> c) throws NamingException
entry - the LDAP entrybaseDn - the base Dn used to set the right Dnc - class to instantiateNamingException - thrown if a directory exception is encountered while looking
at the entrypublic LscDatasets datasets()
public void setDatasets(LscDatasets datasets)
setDatasets in interface IBeanpublic byte[] getDatasetsBytes()
Copyright © 2005-2017 LSC project. All Rights Reserved.