Modifier and Type | Class and Description |
---|---|
static class |
EAV.AttributeAndType
Handy class to pair an attribute and its type.
|
Modifier and Type | Field and Description |
---|---|
protected static ClassLoader |
classLoader
Classloader used to instantiate attribute type implementations.
|
protected com.antiaction.raptor.sql.DBWrapper |
db
DB layer implementation.
|
static int |
DOMAIN_TREE_ID
tree id for
DomainConfiguration attributes and types. |
protected static EAV |
instance
Singleton instance.
|
static int |
SNAPSHOT_TREE_ID
tree id for
SparseFullHarvest attributes and types. |
Constructor and Description |
---|
EAV() |
Modifier and Type | Method and Description |
---|---|
static int |
compare(List<EAV.AttributeAndType> antList1,
List<EAV.AttributeAndType> antList2)
Compare two lists containing attributes and their types.
|
static Set<String> |
getAttributeNames(int tree_id)
Get list of attribute names for a specific tree_id
|
List<EAV.AttributeAndType> |
getAttributesAndTypes(int tree_id,
int entity_id)
Returns a list of attributes and their type for a given entity id and tree id.
|
List<com.antiaction.raptor.dao.AttributeTypeBase> |
getAttributeTypes(int tree_id)
Returns a list of attribute types for the given tree id.
|
static EAV |
getInstance() |
void |
insertAttribute(com.antiaction.raptor.dao.AttributeBase attribute)
Insert attribute into database.
|
void |
saveAttribute(com.antiaction.raptor.dao.AttributeBase attribute)
Update existing attribute.
|
public static final int SNAPSHOT_TREE_ID
SparseFullHarvest
attributes and types.public static final int DOMAIN_TREE_ID
DomainConfiguration
attributes and types.protected static ClassLoader classLoader
protected com.antiaction.raptor.sql.DBWrapper db
public EAV()
public static EAV getInstance()
public void insertAttribute(com.antiaction.raptor.dao.AttributeBase attribute)
attribute
- attribute to insert into databasepublic void saveAttribute(com.antiaction.raptor.dao.AttributeBase attribute)
attribute
- attribute to update in databasepublic List<com.antiaction.raptor.dao.AttributeTypeBase> getAttributeTypes(int tree_id)
tree_id
- tree id to look for attribute types inpublic List<EAV.AttributeAndType> getAttributesAndTypes(int tree_id, int entity_id) throws SQLException
tree_id
- tree id to look inentity_id
- entity to look forSQLException
- if an SQL exception occurs while querying the databasepublic static int compare(List<EAV.AttributeAndType> antList1, List<EAV.AttributeAndType> antList2)
antList1
- antList2
- public static Set<String> getAttributeNames(int tree_id)
tree_id
- a given tree_idCopyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.