DefaultDbProfileDescriptor

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openswing.swing.table.profiles.database.server
Class DefaultDbProfileDescriptor

    java.lang.Object
      org.openswing.swing.table.profiles.database.server.DefaultDbProfileDescriptor

All Implemented Interfaces:
  DbProfileDescriptor

public class DefaultDbProfileDescriptor
extends java.lang.Object
implements DbProfileDescriptor

Title: OpenSwing Framework

Description: Default descriptor of the table related to grid profile storing, where the primary key is based on "functionId","username" and "id" attributes of the GridProfile. The "id" can represent more than one database field.

it is based on a table having the following structure: CREATE TABLE PROFILES(ID VARCHAR,FUNCTION_ID VARCHAR,USERNAME VARCHAR,DESCRIPTION VARCHAR,SORTED_COLS VARCHAR,SORTED_VERSUS VARCHAR,FILTERS VARCHAR,COLS_POS VARCHAR,COLS_VIS VARCHAR,COLS_WIDTH VARCHAR,IS_DEFAULT CHAR(1),PRIMARY KEY(ID))

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
`DefaultDbProfileDescriptor()`

Method Summary
`java.util.Hashtable` | `deleteAllGridProfiles(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 "deleteAllGridProfiles" method.
`java.util.Hashtable` | `deleteUserProfile(java.lang.String functionId, java.lang.Object id)` Callback method used to fill in the WHERE part of the delete SQL instruction with the specified collection of pairs , when executing the "deleteUserProfile" method.
`java.lang.String` | `getColumnsAttributeFieldName()`
`java.lang.String` | `getColumnsVisibilityFieldName()`
`java.lang.String` | `getColumnsWidthFieldName()`
`java.lang.String` | `getCurrentSortedColumnsFieldName()`
`java.lang.String` | `getCurrentSortedVersusColumnsFieldName()`
`java.lang.String` | `getDefaultProfileFieldName()`
`java.lang.String` | `getDescriptionFieldName()`
`java.lang.String` | `getFunctionIdFieldName()`
`java.lang.String[]` | `getIdFieldNames()`
`java.lang.Object[]` | `getNewIdFieldValues(java.sql.Connection conn, org.openswing.swing.table.profiles.java.GridProfile profile)`
`java.lang.String` | `getProfileTableName()`
`java.lang.String` | `getQuickFilterValuesFieldName()`
`java.lang.String` | `getUsernameFieldName()`
`java.util.Hashtable` | `storeUserProfileOnInsert()` Callback method used to fill in the insert SQL instruction with the specified collection of pairs , when executing the "storeUserProfile" method.
`java.util.Hashtable` | `storeUserProfileOnSetUpdate()` Callback method used to fill in the SET part of the update SQL instruction with the specified collection of pairs , when executing the "storeUserProfile" method.
`java.util.Hashtable` | `storeUserProfileOnWhereUpdate()` Callback method used to fill in the WHERE part of the update SQL instruction with the specified collection of pairs , when executing the "storeUserProfile" method.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultDbProfileDescriptor

    public DefaultDbProfileDescriptor()

Method Detail

### getProfileTableName

    public java.lang.String getProfileTableName()

  Specified by:
    `getProfileTableName` in interface `DbProfileDescriptor`
  Returns:
    name of the grid profile table.

### getIdFieldNames

    public java.lang.String[] getIdFieldNames()

  Specified by:
    `getIdFieldNames` in interface `DbProfileDescriptor`
  Returns:
    name of the database fields related to the "id" attribute of GridProfile

### getNewIdFieldValues

    public java.lang.Object[] getNewIdFieldValues(java.sql.Connection conn,
                                                  org.openswing.swing.table.profiles.java.GridProfile profile)
                                           throws java.lang.Throwable

  Specified by:
    `getNewIdFieldValues` in interface `DbProfileDescriptor`
  Returns:
    values related to a new "id" (attribute of GridProfile)
  Throws:
    `java.lang.Throwable`

### getDescriptionFieldName

    public java.lang.String getDescriptionFieldName()

  Specified by:
    `getDescriptionFieldName` in interface `DbProfileDescriptor`
  Returns:
    database field name related to the "description" attribute of GridProfile

### getFunctionIdFieldName

    public java.lang.String getFunctionIdFieldName()

  Specified by:
    `getFunctionIdFieldName` in interface `DbProfileDescriptor`
  Returns:
    database field name related to the "functionId" attribute of GridProfile

### getUsernameFieldName

    public java.lang.String getUsernameFieldName()

  Specified by:
    `getUsernameFieldName` in interface `DbProfileDescriptor`
  Returns:
    database field name related to the "username" attribute of GridProfile

### getCurrentSortedColumnsFieldName

    public java.lang.String getCurrentSortedColumnsFieldName()

  Specified by:
    `getCurrentSortedColumnsFieldName` in interface `DbProfileDescriptor`
  Returns:
    database field name related to the "currentSortedColumns" attribute of GridProfile

### getCurrentSortedVersusColumnsFieldName

    public java.lang.String getCurrentSortedVersusColumnsFieldName()

  Specified by:
    `getCurrentSortedVersusColumnsFieldName` in interface `DbProfileDescriptor`
  Returns:
    database field name related to the "currentSortedVersusColumns" attribute of GridProfile

### getQuickFilterValuesFieldName

    public java.lang.String getQuickFilterValuesFieldName()

  Specified by:
    `getQuickFilterValuesFieldName` in interface `DbProfileDescriptor`
  Returns:
    database field name related to the "quickFilterValues" attribute of GridProfile

### getColumnsAttributeFieldName

    public java.lang.String getColumnsAttributeFieldName()

  Specified by:
    `getColumnsAttributeFieldName` in interface `DbProfileDescriptor`
  Returns:
    database field name related to the "columnsAttribute" attribute of GridProfile

### getColumnsVisibilityFieldName

    public java.lang.String getColumnsVisibilityFieldName()

  Specified by:
    `getColumnsVisibilityFieldName` in interface `DbProfileDescriptor`
  Returns:
    database field name related to the "columnsVisibility" attribute of GridProfile

### getColumnsWidthFieldName

    public java.lang.String getColumnsWidthFieldName()

  Specified by:
    `getColumnsWidthFieldName` in interface `DbProfileDescriptor`
  Returns:
    database field name related to the "columnsWidth" attribute of GridProfile

### getDefaultProfileFieldName

    public java.lang.String getDefaultProfileFieldName()

  Specified by:
    `getDefaultProfileFieldName` in interface `DbProfileDescriptor`
  Returns:
    database field name related to the "defaultProfile" attribute of GridProfile

### storeUserProfileOnInsert

    public java.util.Hashtable storeUserProfileOnInsert()

  Callback method used to fill in the insert SQL instruction with the specified collection of pairs , when executing the "storeUserProfile" method. For instance a CREATE_USER field or a CREATE_DATE field.

  Specified by:
    `storeUserProfileOnInsert` in interface `DbProfileDescriptor`

### storeUserProfileOnSetUpdate

    public java.util.Hashtable storeUserProfileOnSetUpdate()

  Callback method used to fill in the SET part of the update SQL instruction with the specified collection of pairs , when executing the "storeUserProfile" method. For instance an UPDATE_USER field or an UPDATE_DATE field.

  Specified by:
    `storeUserProfileOnSetUpdate` in interface `DbProfileDescriptor`

### storeUserProfileOnWhereUpdate

    public java.util.Hashtable storeUserProfileOnWhereUpdate()

  Callback method used to fill in the WHERE part of the update SQL instruction with the specified collection of pairs , when executing the "storeUserProfile" method.

  Specified by:
    `storeUserProfileOnWhereUpdate` in interface `DbProfileDescriptor`

### deleteUserProfile

    public java.util.Hashtable deleteUserProfile(java.lang.String functionId,
                                                 java.lang.Object id)

  Callback method used to fill in the WHERE part of the delete SQL instruction with the specified collection of pairs , when executing the "deleteUserProfile" method.

  Specified by:
    `deleteUserProfile` in interface `DbProfileDescriptor`

### deleteAllGridProfiles

    public java.util.Hashtable deleteAllGridProfiles(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 "deleteAllGridProfiles" method.

  Specified by:
    `deleteAllGridProfiles` in interface `DbProfileDescriptor`

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD