public class OwStandardDBAttributeBagWriteable extends Object implements OwAttributeBagWriteable
Implements a writable attribute bag for DBs.
Uses the following attribute scheme to access the database e.g.:
| (Number) | UserName (String) | BagName (String) | AttributeName (String) | AttributeValue (String) |
| 1 | OW_SITE_USER | ViewerSize | X | 100 |
| 2 | OW_SITE_USER | ViewerSize | Y | 100 |
| 3 | UserName | SelectedClass | Konto | 1 |
| 4 | UserName | SelectedClass | Kredit | 1 |
| 5 | UserName | SelectedClass | Depot | 1 |
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Constructor and Description |
---|
OwStandardDBAttributeBagWriteable(OwStandardDBAttributeBagWriteableFactory factory_p,
String sBagName_p) |
Modifier and Type | Method and Description |
---|---|
int |
attributecount()
get the number of attributes, or -1 if unknown
|
void |
clear()
clears the contents of the attribute bag
|
Object |
getAttribute(int iIndex_p)
get a object at the specified index or throws OwObjectNotFoundException
|
Object |
getAttribute(String strName_p)
get the attribute with the given name or throws OwObjectNotFoundException
|
Collection |
getAttributeNames()
get all attribute names in the bag
|
Object |
getSafeAttribute(String strName_p,
Object default_p)
get the attribute with the given name, returns default if not found.
|
boolean |
hasAttribute(String strName_p)
check if attribute exists
|
void |
remove(String strName_p)
remove the given attribute
|
void |
save()
save the contents of the attribute bag
|
void |
setAttribute(String strName_p,
Object value_p)
set a object
|
public OwStandardDBAttributeBagWriteable(OwStandardDBAttributeBagWriteableFactory factory_p, String sBagName_p)
public void setAttribute(String strName_p, Object value_p) throws Exception
OwAttributeBagWriteable
setAttribute
in interface OwAttributeBagWriteable
Exception
public void save() throws Exception
OwAttributeBagWriteable
save
in interface OwAttributeBagWriteable
Exception
public Object getAttribute(int iIndex_p) throws Exception
OwAttributeBag
getAttribute
in interface OwAttributeBag
iIndex_p
- int indexException
public Object getAttribute(String strName_p) throws Exception
OwAttributeBag
getAttribute
in interface OwAttributeBag
Exception
public Object getSafeAttribute(String strName_p, Object default_p)
OwAttributeBag
getSafeAttribute
in interface OwAttributeBag
public boolean hasAttribute(String strName_p)
OwAttributeBag
hasAttribute
in interface OwAttributeBag
public int attributecount()
OwAttributeBag
attributecount
in interface OwAttributeBag
public Collection getAttributeNames()
OwAttributeBag
getAttributeNames
in interface OwAttributeBag
public void clear() throws Exception
clear
in interface OwAttributeBagWriteable
Exception
public void remove(String strName_p)
remove
in interface OwAttributeBagWriteable
strName_p
- String name of attributeCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.