org.openswing.swing.table.profiles.database.server
Class DefaultDbActiveProfileDescriptor

java.lang.Object
  extended byorg.openswing.swing.table.profiles.database.server.DefaultDbActiveProfileDescriptor
All Implemented Interfaces:
DbActiveProfileDescriptor

public class DefaultDbActiveProfileDescriptor
extends java.lang.Object
implements DbActiveProfileDescriptor

Title: OpenSwing Framework

Description: Default descriptor of the table related to active profile storing, where the primary key is based on "functionId" and "username" attributes of the GridProfile. It is based on a table having the following structure: CREATE TABLE ACTIVE_PROFILES(FUNCTION_ID VARCHAR,USERNAME VARCHAR,ID NUMERIC,PRIMARY KEY(FUNCTION_ID,USERNAME))

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it


Constructor Summary
DefaultDbActiveProfileDescriptor()
           
 
Method Summary
 java.util.Hashtable deleteAllGridProfileIds(java.lang.String functionId)
          Callback method used to fill in the WHERE part of the delete SQL instruction with the specified collection of pairs , when executing the "deleteAllGridProfileIds" method.
 java.lang.String getActiveProfileTableName()
           
 java.lang.String getFunctionIdFieldName()
           
 java.lang.String[] getIdFieldNames()
           
 java.lang.String getUsernameFieldName()
           
 java.util.Hashtable storeGridProfileIdOnInsert()
          Callback method used to fill in the insert SQL instruction with the specified collection of pairs , when executing the "storeGridProfileId" method.
 java.util.Hashtable storeGridProfileIdOnSetUpdate()
          Callback method used to fill in the SET part of the update SQL instruction with the specified collection of pairs , when executing the "storeGridProfileId" method.
 java.util.Hashtable storeGridProfileIdOnWhereUpdate()
          Callback method used to fill in the WHERE part of the update SQL instruction with the specified collection of pairs , when executing the "storeGridProfileId" method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDbActiveProfileDescriptor

public DefaultDbActiveProfileDescriptor()
Method Detail

getActiveProfileTableName

public java.lang.String getActiveProfileTableName()
Specified by:
getActiveProfileTableName in interface DbActiveProfileDescriptor
Returns:
name of the active profile table.

getFunctionIdFieldName

public java.lang.String getFunctionIdFieldName()
Specified by:
getFunctionIdFieldName in interface DbActiveProfileDescriptor
Returns:
database field name related to the "functionId" attribute of GridProfile

getUsernameFieldName

public java.lang.String getUsernameFieldName()
Specified by:
getUsernameFieldName in interface DbActiveProfileDescriptor
Returns:
database field name related to the "username" attribute of GridProfile

getIdFieldNames

public java.lang.String[] getIdFieldNames()
Specified by:
getIdFieldNames in interface DbActiveProfileDescriptor
Returns:
name of the database fields related to the "id" attribute of GridProfile

storeGridProfileIdOnInsert

public java.util.Hashtable storeGridProfileIdOnInsert()
Callback method used to fill in the insert SQL instruction with the specified collection of pairs , when executing the "storeGridProfileId" method. For instance a CREATE_USER field or a CREATE_DATE field.

Specified by:
storeGridProfileIdOnInsert in interface DbActiveProfileDescriptor

storeGridProfileIdOnSetUpdate

public java.util.Hashtable storeGridProfileIdOnSetUpdate()
Callback method used to fill in the SET part of the update SQL instruction with the specified collection of pairs , when executing the "storeGridProfileId" method. For instance an UPDATE_USER field or an UPDATE_DATE field.

Specified by:
storeGridProfileIdOnSetUpdate in interface DbActiveProfileDescriptor

storeGridProfileIdOnWhereUpdate

public java.util.Hashtable storeGridProfileIdOnWhereUpdate()
Callback method used to fill in the WHERE part of the update SQL instruction with the specified collection of pairs , when executing the "storeGridProfileId" method.

Specified by:
storeGridProfileIdOnWhereUpdate in interface DbActiveProfileDescriptor

deleteAllGridProfileIds

public java.util.Hashtable deleteAllGridProfileIds(java.lang.String functionId)
Callback method used to fill in the WHERE part of the delete SQL instruction with the specified collection of pairs , when executing the "deleteAllGridProfileIds" method.

Specified by:
deleteAllGridProfileIds in interface DbActiveProfileDescriptor