com.wewebu.ow.server.util
Class OwStandardDBAttributeBagWriteable

java.lang.Object
  extended by com.wewebu.ow.server.util.OwStandardDBAttributeBagWriteable
All Implemented Interfaces:
OwAttributeBag, OwAttributeBagWriteable

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 Summary
OwStandardDBAttributeBagWriteable(OwStandardDBAttributeBagWriteableFactory factory_p, String sBagName_p)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwStandardDBAttributeBagWriteable

public OwStandardDBAttributeBagWriteable(OwStandardDBAttributeBagWriteableFactory factory_p,
                                         String sBagName_p)
Method Detail

setAttribute

public void setAttribute(String strName_p,
                         Object value_p)
                  throws Exception
Description copied from interface: OwAttributeBagWriteable
set a object

Specified by:
setAttribute in interface OwAttributeBagWriteable
Throws:
Exception

save

public void save()
          throws Exception
Description copied from interface: OwAttributeBagWriteable
save the contents of the attribute bag

Specified by:
save in interface OwAttributeBagWriteable
Throws:
Exception

getAttribute

public Object getAttribute(int iIndex_p)
                    throws Exception
Description copied from interface: OwAttributeBag
get a object at the specified index or throws OwObjectNotFoundException

Specified by:
getAttribute in interface OwAttributeBag
Parameters:
iIndex_p - int index
Returns:
Object
Throws:
Exception

getAttribute

public Object getAttribute(String strName_p)
                    throws Exception
Description copied from interface: OwAttributeBag
get the attribute with the given name or throws OwObjectNotFoundException

Specified by:
getAttribute in interface OwAttributeBag
Throws:
Exception

getSafeAttribute

public Object getSafeAttribute(String strName_p,
                               Object default_p)
Description copied from interface: OwAttributeBag
get the attribute with the given name, returns default if not found.

Specified by:
getSafeAttribute in interface OwAttributeBag

hasAttribute

public boolean hasAttribute(String strName_p)
Description copied from interface: OwAttributeBag
check if attribute exists

Specified by:
hasAttribute in interface OwAttributeBag

attributecount

public int attributecount()
Description copied from interface: OwAttributeBag
get the number of attributes, or -1 if unknown

Specified by:
attributecount in interface OwAttributeBag

getAttributeNames

public Collection getAttributeNames()
Description copied from interface: OwAttributeBag
get all attribute names in the bag

Specified by:
getAttributeNames in interface OwAttributeBag

clear

public void clear()
           throws Exception
clears the contents of the attribute bag

Specified by:
clear in interface OwAttributeBagWriteable
Throws:
Exception

remove

public void remove(String strName_p)
remove the given attribute

Specified by:
remove in interface OwAttributeBagWriteable
Parameters:
strName_p - String name of attribute


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.