xmlBlaster 2.2.0 contributions API

org.xmlBlaster.contrib.db
Class DbStorage

java.lang.Object
  extended by org.xmlBlaster.contrib.db.DbStorage

public class DbStorage
extends java.lang.Object

DbStorage

Author:
Michele Laghi

Constructor Summary
DbStorage(I_Info info, I_DbPool pool, java.lang.String context)
           
 
Method Summary
 boolean addProperty(org.xmlBlaster.util.qos.ClientProperty prop)
          Adds a new property to the Table.
 int clean()
          Removes all the properties of this context.
 java.util.Set getKeys()
           
 org.xmlBlaster.util.qos.ClientProperty getProperty(java.lang.String key)
          Modifies an existing property.
 boolean modifyProperty(org.xmlBlaster.util.qos.ClientProperty prop)
          Modifies an existing property.
 void put(org.xmlBlaster.util.qos.ClientProperty prop)
          This method tries first to update the entry.
 boolean remove(java.lang.String key)
          Removes the property with the given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbStorage

public DbStorage(I_Info info,
                 I_DbPool pool,
                 java.lang.String context)
          throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

addProperty

public boolean addProperty(org.xmlBlaster.util.qos.ClientProperty prop)
                    throws java.lang.Exception
Adds a new property to the Table. If the entry already exists, an exception is thrown.

Parameters:
prop -
Throws:
java.lang.Exception

modifyProperty

public boolean modifyProperty(org.xmlBlaster.util.qos.ClientProperty prop)
                       throws java.lang.Exception
Modifies an existing property. If the property does not exist, an exception is thrown.

Parameters:
prop -
Throws:
java.lang.Exception

getProperty

public org.xmlBlaster.util.qos.ClientProperty getProperty(java.lang.String key)
                                                   throws java.lang.Exception
Modifies an existing property. If the property does not exist, an exception is thrown.

Parameters:
prop -
Throws:
java.lang.Exception

remove

public boolean remove(java.lang.String key)
               throws java.lang.Exception
Removes the property with the given key. If none found, nothing happens.

Parameters:
key -
Returns:
true if the entry was removed, false otherwise (i.e. if the entry was not found).
Throws:
java.lang.Exception

clean

public int clean()
          throws java.lang.Exception
Removes all the properties of this context.

Returns:
the number of entries removed.
Throws:
java.lang.Exception

put

public void put(org.xmlBlaster.util.qos.ClientProperty prop)
         throws java.lang.Exception
This method tries first to update the entry. If an exception, then presumably the entry did not exist, so an insert is made. If this fails too, then an exception is thrown.

Parameters:
prop -
Throws:
java.lang.Exception

getKeys

public java.util.Set getKeys()
                      throws java.lang.Exception
Throws:
java.lang.Exception

xmlBlaster 2.2.0 contributions API

Copyright © 1999-2014 The xmlBlaster.org contributers.