[cvs] Expresso commit by mtraum: removed many depreciated methods

JCorporate Ltd jcorp at jcorp2.servlets.net
Tue Oct 12 00:51:02 PDT 2004


Log Message:
-----------
removed many depreciated methods

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj:
        DBObject.java

Revision Data
-------------
Index: DBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java,v
retrieving revision 1.211
retrieving revision 1.212
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java -u -r1.211 -r1.212
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java
@@ -64,7 +64,36 @@
 
 package com.jcorporate.expresso.core.dbobj;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.lang.reflect.Method;
+import java.math.BigDecimal;
+import java.sql.SQLException;
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import org.apache.log4j.Category;
+import org.apache.log4j.Logger;
+import org.apache.oro.text.regex.Pattern;
+import org.apache.oro.text.regex.PatternMatcher;
+import org.apache.oro.text.regex.Perl5Matcher;
+
 import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
+
 import com.jcorporate.expresso.core.cache.CacheException;
 import com.jcorporate.expresso.core.cache.CacheManager;
 import com.jcorporate.expresso.core.cache.CacheSystem;
@@ -99,34 +128,6 @@
 import com.jcorporate.expresso.services.dbobj.ChangeLog;
 import com.jcorporate.expresso.services.dbobj.DBObjLimit;
 import com.jcorporate.expresso.services.dbobj.Setup;
-import org.apache.log4j.Category;
-import org.apache.log4j.Logger;
-import org.apache.oro.text.regex.Pattern;
-import org.apache.oro.text.regex.PatternMatcher;
-import org.apache.oro.text.regex.Perl5Matcher;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.lang.reflect.Method;
-import java.math.BigDecimal;
-import java.sql.SQLException;
-import java.text.DecimalFormat;
-import java.text.NumberFormat;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.Vector;
 
 
 /**
@@ -589,51 +590,6 @@
     }
 
     /**
-     * Register another object as "listening" for changes to this dbobject. Whenever
-     * updates/adds/deletes occur to this DBObject, notify the registered object that
-     * the change has taken place. This only works between DB objects running in the
-     * same Virtual Machine (e.g. it is not a distribtued solution - yet)
-     *
-     * @param senderClass class name to send from.
-     * @param newListener the target event listener.
-     * @deprecated use CacheManager.getInstance().addCacheEventListener() which is called automatically from setLookupObject()
-     */
-    public static synchronized void addCacheEventListener(String senderClass,
-                                                          CacheEventListener newListener) {
-        if (sListeners == null) {
-            sListeners = new Hashtable();
-        }
-
-        ArrayList listeners = (ArrayList) sListeners.get(senderClass);
-        String newListenerClassName = newListener.getClass().getName();
-        if (listeners == null) {
-            listeners = new ArrayList(2);
-        } else {
-            String oneListenerName = null;
-
-            /* Check to see if it's there already - don't add it again if it is */
-            for (Iterator i = listeners.iterator(); i.hasNext();) {
-                oneListenerName = (String) i.next();
-
-                if (oneListenerName.equals(newListenerClassName)) {
-
-                    /* it's already there, just bail out */
-                    return;
-                }
-            } /* for */
-
-        }
-
-        listeners.add(newListenerClassName);
-        sListeners.put(senderClass, listeners);
-
-        if (log.isDebugEnabled()) {
-            log.debug("Object " + newListenerClassName +
-                    " added to listeners for " + senderClass);
-        }
-    } /* addCacheEventListener(String, CacheEventListener) */
-
-    /**
      * Specify a new "detail" db object, and the fields in this object
      * they specify the fields in the related object
      *
@@ -1105,21 +1061,6 @@
                 fieldDescription);
     } /* addVirtualField(String, String, int, String) */
 
-
-    /**
-     * Does the specified field allow Null?
-     *
-     * @param fieldName The name of the field name to check
-     * @return true if this field allows null values
-     * @deprecated Since Expresso 5.1  Use DBObject.getMetaData().isAllowsNull(String fieldName)
-     *             instead
-     */
-    public boolean allowsNull(String fieldName)
-            throws DBException {
-        return getDef().allowsNull(fieldName);
-    } /* allowsNull(String) */
-
-
     /**
      * Find the average of the values in the specified field of records
      * se;lected by the DBObject selection criteria.
@@ -2219,32 +2160,6 @@
         return rangeVerifier.denotesRange(fieldValue);
     } /* denotesRange(String) */
 
-    /**
-     * Disable change logging of this object
-     *
-     * @deprecated Since Expresso 5.1
-     *             Use DBObject.getMetaData().disableLogging() instead.
-     */
-    public synchronized void disableLogging()
-            throws DBException {
-        getDef().disableLogging();
-    } /* disableLogging() */
-
-
-    /**
-     * Enable logging of changes to this object. Change logging writes an entry to
-     * the ChangeLog object every time an add, update, or delete is made to this
-     * object. It is used to track important tables, such as user information,
-     * account information, etc.
-     *
-     * @deprecated Since Expresso 5.1
-     *             Use DBObject.getMetaData().disableLogging() instead.
-     */
-    public synchronized void enableLogging()
-            throws DBException {
-        getDef().enableLogging();
-    } /* enableLogging() */
-
 
     /**
      * A lot like retrieve, but works with any fields, not just the key field. Does not
@@ -2582,96 +2497,6 @@
 
 
     /**
-     * @return a map of all DBFields
-     * @deprecated Since Expresso 5.1
-     *             Use DBObject.getMetaData.getAllDBFields() instead.
-     */
-    protected HashMap getAllDBFields()
-            throws DBException {
-        return getDef().getAllDBFields();
-    } /* getAllDBFields() */
-
-
-    /**
-     * Return the "allFields" Hashtable, which contains all of the DBField objects
-     * that make up this DB object.
-     *
-     * @return a Hashtable containing all fields for this dbobject
-     * @deprecated Since Expresso 5.1
-     *             Use DBObject.getMetaData.getAllDBFields() instead.
-     */
-    protected synchronized Hashtable getAllFields()
-            throws DBException {
-        return new Hashtable(getJDBCMetaData().getAllFieldsMap());
-    } /* getAllFields() */
-
-
-    /**
-     * <b>Non threadsafe</b> way to get an interator into the allFields objects
-     *
-     * @return an Iterator into the allFields HashMap
-     * @deprecated Use getMetaData().getAllFieldsMap().values().iterator()
-     *             instead [Since Expresso 5.1]
-     */
-    public Iterator getAllFieldsIterator() {
-        return getJDBCMetaData().getAllFieldsMap().values().iterator();
-    }
-
-    /**
-     * Return the "allFields" Hashtable, which contains all of the DBField objects
-     * that make up this DB object.
-     *
-     * @return a field HashMap
-     * @deprecated Since Expresso 5.1
-     *             Use DBObject.getMetaData.getAllFieldsMap() instead.
-     */
-    protected synchronized HashMap getAllFieldsMap()
-            throws DBException {
-        return getJDBCMetaData().getAllFieldsMap();
-    }
-
-    /**
-     * Return the "allKeys" hash, containing the DBField objects that make up
-     * the primary key for this db object.
-     *
-     * @return all DBObject Field keys in a hashmap.
-     * @deprecated Since Expresso 5.1
-     *             Use DBObject.getMetaData.getAllKeysMap() instead.
-     */
-    protected synchronized Hashtable getAllKeys()
-            throws DBException {
-        return new Hashtable(getJDBCMetaData().getAllKeysMap());
-    } /* getAllKeys() */
-
-
-    /**
-     * <b> Non-threadsafe </b> way to get an interator into the allKeys data
-     * structure
-     *
-     * @return all Keyfields in an iterator
-     * @deprecated Since Expresso 5.1
-     *             Use DBObject.getMetaData.getAllKeysIterator() instead.
-     */
-    public Iterator getAllKeysIterator() {
-        return getDef().getAllKeysIterator();
-    } /* getAllKeysIterator() */
-
-
-    /**
-     * Return the "allKeys" hash, containing the DBField objects that make up
-     * the primary key for this db object.
-     *
-     * @return a HashMap of all keys
-     * @deprecated Since Expresso 5.1
-     *             Use DBObject.getMetaData.getAllKeysMap() instead.
-     */
-    protected synchronized HashMap getAllKeysMap()
-            throws DBException {
-        return getDef().getAllKeysMap();
-    } /* getAllKeysMap() */
-
-
-    /**
      * Return an "attribute". Attributes are temporary (e.g. not stored in the DBMS)
      * values associated with this particular DB object instance.
      *
@@ -2686,19 +2511,6 @@
         }
     } /* getAttribute(String) */
 
-    /**
-     * Retrieve the general-purpose attribute for a field
-     *
-     * @param fieldName  The fieldname to get the attribute for
-     * @param attribName The particular attribute for the field to retrieve
-     * @return the associated Object or null if there is no attribute
-     * @deprecated Since Expresso 5.1
-     *             Use getDataField(fieldName).getMetaData.getAttribute(attribName) instead.
-     */
-    public Object getAttribute(String fieldName, String attribName)
-            throws DBException {
-        return getDef().getAttribute(fieldName, attribName);
-    }
 
     /**
      * Get an iterator for all of the attributes specified for a field
@@ -2738,13 +2550,6 @@
         return myCacheSize;
     } /* getCacheSize() */
 
-    /**
-     * @return a Hashtable of all cache stats for this table
-     * @deprecated - use getCacheStatsMap instead
-     */
-    public synchronized static Hashtable getCacheStats() {
-        return new Hashtable(sCacheStats);
-    }
 
     /**
      * @return a HashMap of all cache stats
@@ -2753,18 +2558,6 @@
         return new HashMap(sCacheStats);
     }
 
-    /**
-     * return the current object's character set
-     *
-     * @return The string containing the current characterset for this object
-     * @deprecated Since Expresso 5.1
-     *             Use getMetaData().getCharSet() instead
-     */
-    public synchronized String getCharset()
-            throws DBException {
-        return getDef().getCharset();
-    } /* getCharset() */
-
 
     /**
      * Returns the metadata for the specified field.
@@ -2786,7 +2579,6 @@
         return oneField;
     } /* getDBField(String) */
 
-
     /**
      * Return the name of the context/database connection that this DB object is using.
      * If none is set, then we are using the "default" database/context.
@@ -2799,79 +2591,6 @@
         return getDataContext();
     } /* getDBName() */
 
-
-    /**
-     * Return the default value for a field, if any. Return null
-     * if no default value specified.
-     *
-     * @param fieldName The field name to get the default value for
-     * @return the default value
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getDefaultValue(fieldName) instead
-     */
-    public String getDefaultValue(String fieldName)
-            throws DBException {
-        return getDef().getDefaultValue(fieldName);
-    }
-
-    /**
-     * Return a description of this database object. If no explicit description has
-     * been set, return the class name.
-     *
-     * @return A string describing this database object
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getDescription() instead
-     */
-    public String getDescription()
-            throws DBException {
-        return getMetaData().getDescription();
-    } /* getDescription() */
-
-
-    /**
-     * Return the long description of a field, if available
-     *
-     * @param fieldName The name of the field
-     * @return String: The long description of the field (user-readable)
-     * @throws DBException If there is no such field
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getDescription(fieldName) instead
-     */
-    public String getDescription(String fieldName)
-            throws DBException {
-        return getMetaData().getDescription(fieldName);
-    } /* getDescription(String) */
-
-
-    /**
-     * Return a pipe-delimited list of field names in the named detail
-     * db object that have corresponding fields in this db object
-     *
-     * @param detailName the classname of the detail object
-     * @return java.lang.String
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getDetailFieldsForeign(detailName) instead
-     */
-    public String getDetailFieldsForeign(String detailName)
-            throws DBException {
-        return getDef().getDetailFieldsForeign(detailName);
-    }
-
-    /**
-     * Return a pipe-delimited list of field names in this db object
-     * that have corresponding fields in the specified detail
-     * db object.
-     *
-     * @param detailName The classname of the detail object
-     * @return java.lang.String
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getDetailFieldsLocal(detailName) instead
-     */
-    public String getDetailFieldsLocal(String detailName)
-            throws DBException {
-        return getDef().getDetailFieldsLocal(detailName);
-    }
-
     /**
      * Get a list of all db objects that are specified as being "details"
      * to this db object. Returns an empty enumeration if there are no details
@@ -2914,23 +2633,6 @@
 
 
     /**
-     * Get a special <code>enumeration</code> object list of all
-     * of the fields in this object that are set to <b>distinct</b>
-     *
-     * @return An enumerator of all of the
-     *         <b>distinct</b> fieldNames in this object
-     * @throws DBException If the list cannot be retrieved
-     *                     <p/>
-     *                     author Peter Pilgrim <peter.pilgrim at db.com>
-     * @deprecated use getDistinctFieldArrayList() instead
-     */
-    public Enumeration getDistinctFieldList()
-            throws DBException {
-        return new Vector(getDistinctFieldArrayList()).elements();
-    } /* getDistinctFieldList() */
-
-
-    /**
      * <p>This convenience method iterates through all the
      * fields belonging to this <code>DBObject</code>
      * returns an array of field names ( <code>String</code> )
@@ -3487,129 +3189,17 @@
 
 
     /**
-     * Get a list of all of the fields in this object
-     *
-     * @return A Vector of all of the fieldNames in this object
-     * @throws DBException If the list cannot be retrieved
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getFieldListArray() instead
-     */
-    public synchronized Enumeration getFieldList()
-            throws DBException {
-        return getDef().getFieldList();
-    } /* getFieldList() */
-
-
-    /**
-     * Get a list of all of the fields in this object This is threadsafe in that
-     * it makes a new copy of the fieldNamesInOrder ArrayList
-     *
-     * @return A Vector of all of the fieldNames in this object
-     * @throws DBException If the list cannot be retrieved
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getFieldListArray() instead
-     */
-    public synchronized ArrayList getFieldListArray() throws DBException {
-        return getDef().getFieldListArray();
-    }
-
-    /**
-     * Get a list of all of the fields in this object This iterator is not thread
-     * safe.
-     *
-     * @return An iterator of the fieldNamesInOrder array list
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getFieldListArray() instead
-     */
-    public Iterator getFieldListIterator() {
-        return getDef().getFieldListIterator();
-    }
-
-    /**
-     * Retrieves the binary field as an Input stream. Note that care must be
-     * excercised currently since we must read all the data in from the connection
-     * into a byte array first so <b>very</b> large data objects will have
-     * significant memory impact.  Because of this it's also recommended that
-     * for maximum performance you might want some sort of Persistant store
-     * cacheing scheme.
-     *
-     * @param fieldName the name of the field to retrieve
-     * @return an InputStream object that will contain the object to retrieve
-     * @throws DBException upon error
-     * @see com.jcorporate.expresso.services.dbobj.MediaDBObject
-     * @deprecated since Expresso 5.1  Use LobField directly or
-     *             com.jcorporate.expresso.services.dbobj.MediaDBObject for BLOB storage since
-     *             they all require much less memory as well as provides more dynamic database
-     *             support.
-     */
-    public InputStream getBinaryField(String fieldName) throws DBException {
-        DBConnectionPool connectionPool = null;
-        DBConnection myConnection = localConnection;
-        InputStream is = null;
-        if (localConnection == null) {
-            connectionPool = DBConnectionPool.getInstance(getDataContext());
-            myConnection = connectionPool.getConnection();
-        }
-
-        try {
-            byte data[] = LOBSupport.getInstance().getBLOB(this, fieldName, myConnection);
-            is = new ByteArrayInputStream(data);
-        } finally {
-            if (localConnection == null) {
-                if (connectionPool != null) {
-                    connectionPool.release(myConnection);
-                }
-            }
-        }
-        return is;
-    }
-
-    /**
-     * Sets a BLOB file to this table.
+     * Sets a byte array to the underlying data as a blob
      *
      * @param fieldName    The name of the field to save.
      * @param incomingData the stream to write to the database table.
-     * @param dataLength   the total length of the incoming data stream.  For
-     *                     example, if you're saving a file, then the total length of the file.
      * @throws DBException upon error
-     * @deprecated since Expresso 5.1.  Use LobField directly or
+     * @deprecated since Expresso 5.6.  Use LobField directly or
      *             com.jcorporate.expresso.services.dbobj.MediaDBObject for BLOB storage since
      *             they all require much less memory as well as provides more dynamic database
      *             support.
      */
     public void saveBinaryField(String fieldName,
-                                InputStream incomingData,
-                                int dataLength) throws DBException {
-        DBConnectionPool connectionPool = null;
-        DBConnection myConnection = localConnection;
-
-        if (localConnection == null) {
-            connectionPool = DBConnectionPool.getInstance(getDataContext());
-        }
-
-        try {
-            LOBSupport.getInstance().setBLOB(this, fieldName,
-                    incomingData,
-                    dataLength,
-                    myConnection);
-        } finally {
-            if (localConnection == null) {
-                if (connectionPool != null) {
-                    connectionPool.release(myConnection);
-                }
-            }
-        }
-        return;
-    }
-
-    /**
-     * Sets a byte array to the underlying data as a blob
-     *
-     * @param fieldName    The name of the field to save.
-     * @param incomingData the stream to write to the database table.
-     * @throws DBException upon error
-     */
-    public void saveBinaryField(String fieldName,
                                 byte[] incomingData) throws DBException {
         DBConnectionPool connectionPool = null;
         DBConnection myConnection = localConnection;
@@ -3633,30 +3223,11 @@
         return;
     }
 
-    /**
-     * This convenience method iterates through all the
-     * fields belonging to this <code>DBObject</code>
-     * returns an array of field names ( <code>String</code> ).
-     * <p>Author: Peter Pilgrim</p>
-     *
-     * @return String array of all field names in this object.
-     * @see #getFieldList()
-     * @see #getDistinctFieldCount()
-     * @see #getDistinctFieldList()
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getFields() instead
-     */
-    public String[] getFields()
-            throws DBException {
-        return getDef().getFields();
-    } /* getFields() */
-
-
+    
     /**
      * This convenience method counts
      * <code>DBFields</code> belonging to this
      * <code>DBObject</code> that are set to <b>retrieve</b>.
-     * author Yves Henri Amaizo <amy_amaizo at compuserve.com>
      *
      * @return int number of retrieve fields.
      */
@@ -3684,20 +3255,6 @@
         }
     } /* getFoundCount() */
 
-    /**
-     * Return the Vector of keys (in the form field/field/field) that
-     * was found in the last search() call
-     *
-     * @return A vector containing keys as strings
-     * @deprecated Use getFoundKeysArray() instead
-     */
-    public Vector getFoundKeys() {
-        if (foundKeys == null) {
-            return new Vector();
-        } else {
-            return (Vector) foundKeys.clone();
-        }
-    } /* getFoundKeys() */
 
     /**
      * Return the Array of keys (in the form field/field/field) that
@@ -3722,7 +3279,8 @@
      * To be soon deprecated
      *
      * @return an object containing all the DBOBjects
-     *         Use getMetaData().getIndexArray() instead
+     * 
+     * @depreciated since 5.6, Use getMetaData().getIndexArray() instead
      */
     public synchronized Object[] getIndexArray()
             throws DBException {
@@ -3745,31 +3303,6 @@
         }
     } /* getKey() */
 
-    /**
-     * Get a list of all of the names of the key fields in this object
-     *
-     * @return A Vector of all of the names of the key fields
-     * @deprecated Use getKeyFieldArray instead
-     */
-    public Enumeration getKeyFieldList()
-            throws DBException {
-        Vector newKeys = new Vector(getMetaData().getKeyFieldListArray());
-
-        return newKeys.elements();
-    } /* getKeyFieldList() */
-
-
-    /**
-     * Get a list of all of the names of the key fields in this object
-     *
-     * @return An ArrayList of all of the names of the key fields
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getKeyFieldListArray() instead
-     */
-    public ArrayList getKeyFieldListArray()
-            throws DBException {
-        return getMetaData().getKeyFieldListArray();
-    }
 
     /**
      * Get a list of all of the fields in this object This iterator is not thread
@@ -3809,37 +3342,6 @@
         return new Integer(getLength(fieldName)).intValue();
     }
 
-    /**
-     * programmatically gets the limitation optimisation insertion position
-     * <p/>
-     * author Peter Pilgrim, Thu Jun 21 10:30:59 BST 2001
-     *
-     * @return the limitation position code.
-     * @deprecated Use the connection pool version instead
-     */
-    public synchronized int getLimitationPosition() {
-        try {
-            return getConnectionPool().getLimitationPosition();
-        } catch (DataException ex) {
-            return 0;
-        }
-    }
-
-    /**
-     * programmatically gets the limitation syntax string
-     * <p/>
-     * author Peter Pilgrim, Thu Jun 21 10:30:59 BST 2001
-     *
-     * @return the Limitation Syntax String
-     * @deprecated use the pool limitation syntax instead
-     */
-    public synchronized String getLimitationSyntax() {
-        try {
-            return getConnectionPool().getLimitationSyntax();
-        } catch (DataException ex) {
-            return null;
-        }
-    }
 
     /**
      * Get a field's lookup object - this is the name of another database
@@ -3989,21 +3491,6 @@
 
 
     /**
-     * Return the vector of updates (see the inner class) that specify what changes
-     * were just made to this object.
-     *
-     * @return Vector containing logged updates
-     * @deprecated - Use getMyUpdatesArray() instead
-     */
-    protected Vector getMyUpdates() {
-        if (myUpdates == null) {
-            return new Vector();
-        }
-
-        return new Vector(myUpdates);
-    } /* getMyUpdates() */
-
-    /**
      * Return the array of updates (see the inner class) that specify what changes
      * were just made to this object.
      *
@@ -4017,19 +3504,6 @@
         return myUpdates.toArray();
     } /* getMyUpdatesArray() */
 
-    /**
-     * Get the name of this object
-     *
-     * @return String The database object name, or the table name if none
-     *         has been assigned
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getName() instead
-     */
-    public String getName()
-            throws DBException {
-        return getDef().getName();
-    } /* getName() */
-
 
     /**
      * Gets the number of records that be skipped. The offset records.
@@ -4046,16 +3520,6 @@
         return offsetRecord;
     } /* getOffsetRecord() */
 
-    /**
-     * Return the name of the db/context originally requested. getDBName will return the name of the db/context
-     * that we've been "mapped" to if such mapping occurs.
-     *
-     * @return the original dbname before the otherdb lookup occurs
-     * @deprecated Use getMappedDataContext instead
-     */
-    public String getOriginalDBName() {
-        return getMappedDataContext();
-    }
 
     /**
      * Get the precision of thie field, if one was specified
@@ -4072,45 +3536,6 @@
 
 
     /**
-     * Return the set of records found by the last searchAndRetrieve
-     *
-     * @return Vector of DB Objects retrieved by the last searchAndRetrieve
-     * @deprecated Use getRecordSetArrayList() instead
-     */
-    public Vector getRecordSet() {
-        if (recordSet == null) {
-            return new Vector();
-        }
-
-        return new Vector(recordSet);
-    } /* getRecordSet() */
-
-    /**
-     * Return the set of records found by the last searchAndRetrieve
-     *
-     * @return Object of DB Objects retrieved by the last searchAndRetrieve
-     * @deprecated This function is unhealthy for memory.
-     */
-    public synchronized ArrayList getRecordSetArrayList() {
-        if (recordSet == null) {
-            recordSet = new ArrayList();
-        }
-
-        return (ArrayList) recordSet.clone();
-    } /* getRecordSetArrayList */
-
-    /**
-     * @return Returns the schema name
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getSchema() instead
-     */
-    public String getSchema()
-            throws DBException {
-        return getDef().getSchema();
-    } /* getSchema() */
-
-
-    /**
      * This function is called whenever the DBField is about to be written to
      * the database.  It may do additional processing such as encryption depending
      * on the field attributes.
@@ -4129,33 +3554,6 @@
 
 
     /**
-     * Return the Table Name of the current database object. Keep in mind
-     * that a database object could update or affect other tables as well.
-     *
-     * @return String: Table name of the target table of this database object
-     * @deprecated Since Expresso 5.0  Use getTargetTable instead [Will be
-     *             removed in Expresso 5.2]
-     */
-    public String getTableName()
-            throws DBException {
-        return getDef().getTargetTable();
-    } /* getTableName() */
-
-
-    /**
-     * Return the Table Name of the current database object. Keep in mind
-     * that a database object could update or affect other tables as well.
-     *
-     * @return String: Table name of the target table of this database object
-     * @deprecated since Expresso 5.1; Use getJDBCMetaData().getTargetSQLTable() instead
-     */
-    public String getTargetTable()
-            throws DBException {
-        return getDef().getTargetTable();
-    }
-
-
-    /**
      * This will return a new object of the type of the subclass.
      * <p/>
      * OVERRIDE this method with implentation like
@@ -4308,36 +3706,6 @@
         setStatus(BaseDataObject.STATUS_CURRENT);
     }
 
-    /**
-     * ????
-     *
-     * @return Iterator of Transitions
-     * @throws DBException upon error
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().getTransitionsIterator() instead
-     */
-    public Iterator getTransitionsIterator()
-            throws DBException {
-        return getDef().getTransitionsIterator();
-    }
-
-
-    /**
-     * Return the type of a field - this method returns the internal Expresso type
-     *
-     * @param fieldName The name of the field
-     * @return String: The type of the field
-     * @throws DBException If there is no such field in this object
-     * @deprecated since Expresso 5.1
-     *             Use getFieldMetaData(String).getTypeString() instead
-     */
-    public String getType(String fieldName)
-            throws DBException {
-        DataFieldMetaData oneField = getFieldMetaData(fieldName);
-
-        return oneField.getTypeString();
-    } /* getType(String) */
-
 
     /**
      * This is a convenience method which will return a ValidValue description
@@ -4910,33 +4278,6 @@
 
 
     /**
-     * This method will return a boolean true if the field is defined in the DBOBject,
-     * false otherwise.
-     * Creation date: (8/8/00 11:04:32 AM)
-     *
-     * @param fieldName java.lang.String
-     * @return boolean
-     * @deprecated Use isField(String) instead
-     */
-    public boolean hasField(String fieldName)
-            throws DBException {
-        return getMetaData().isField(fieldName);
-    } /* hasField(String) */
-
-
-    /**
-     * Returns true if an Index exists for this array.
-     *
-     * @return true if this has an index
-     * @deprecated since Expresso 5.1
-     *             Use getMetaData().hasIndex() instead
-     */
-    public boolean hasIndex()
-            throws DBException {
-        return getJDBCMetaData().hasIndex();
-    }
-
-    /**
      * See if we have a value for each of the key fields
      *
      * @return True if all key fields have a value, false if not
@@ -5040,25 +4381,6 @@
     } /* isCached() */
 
     /**
-     * Return true if the given type is a date/time type of field
-     *
-     * @param theType The type to check
-     * @return true if the data type is a date type
-     * @deprecated use DBField.isDateType()
-     *             deprecated May 2002; remove anytime after 1/2003
-     */
-    public static boolean isDateType(String theType) {
-        if (theType.equalsIgnoreCase("date") ||
-                theType.equalsIgnoreCase("time") ||
-                theType.equalsIgnoreCase("datetime") ||
-                theType.equalsIgnoreCase("timestamp")) {
-            return true;
-        }
-
-        return false;
-    } /* isDateType(String) */
-
-    /**
      * This method iterates through all the <code>DBFields</code> belonging
      * <code>DBObject</code> returns <code>true</code> if any of them are
      * set a <b>distinct</b>.
@@ -5150,31 +4472,6 @@
         return true;
     } /* isEmpty() */
 
-    /**
-     * Check if a certain name is a field (of any kind) in this DBOBject
-     * since SQL is case insensitive, ignore case of field name for match,
-     * this method takes longer, so use isField if the field name is known precisely
-     *
-     * @param fieldName is this a field name
-     * @return internal format for field name if matched, or null if no match
-     * @deprecated Since Expresso 5.1
-     *             Use getMetaData().isFieldIgnoreCase() instead
-     */
-    public String isFieldIgnoreCase(String fieldName) {
-        return getDef().isFieldIgnoreCase(fieldName);
-    }
-
-    /**
-     * Check if a certain name is a field (of any kind) in this DBOBject
-     *
-     * @param fieldName The field name to check
-     * @return true if the field is a valid field name
-     * @deprecated Since Expresso 5.1
-     *             Use getMetaData().isField() instead
-     */
-    public boolean isField(String fieldName) {
-        return getDef().isField(fieldName);
-    }
 
     /**
      * Convenience method to check if a field is distinct or not
@@ -5268,50 +4565,13 @@
 
 
     /**
-     * @param theType theDatatype to check
-     * @return true if the data type is a numeric type
-     * @deprecated use DBField.isNumericType()
-     *             deprecated May 2002; remove anytime after 1/2003
-     */
-    public static boolean isNumericType(String theType) {
-        if (theType.equalsIgnoreCase(DBField.NUMERIC_TYPE) ||
-                theType.equalsIgnoreCase(DBField.INT_TYPE) ||
-                theType.equalsIgnoreCase(DBField.INTEGER_TYPE) ||
-                theType.equalsIgnoreCase(DBField.LONG_TYPE) ||
-                theType.equalsIgnoreCase(DBField.DOUBLE_TYPE) ||
-                theType.equalsIgnoreCase(DBField.FLOAT_TYPE) ||
-                theType.equalsIgnoreCase(DBField.DECIMAL_TYPE) ||
-                theType.equalsIgnoreCase(DBField.AUTOINC_TYPE)) {
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * @param theType the data type to check
-     * @return true if the datatype should be quoted in SQL statements
-     * @deprecated use DBField.isQuotedTextType()
-     *             deprecated May 2002; remove anytime after 1/2003
-     */
-    public static boolean isQuotedType(String theType) {
-        if (theType.equalsIgnoreCase(DBField.CHAR_TYPE) ||
-                theType.equalsIgnoreCase(DBField.VARCHAR_TYPE) ||
-                theType.equalsIgnoreCase(DBField.TEXT_TYPE) ||
-                theType.equalsIgnoreCase(DBField.LONGVARCHAR_TYPE)) {
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
      * Is a given field readOnly - these fields are not offered for entry
      * when a form is produced by the generic database maintenance servlet
      *
      * @param fieldName The field name to check
      * @return True of the field is "read only", false if it is not
      * @throws DBException Ff there is no such field
+     * @deprecated since 5.6, use DBField.isReadOnly()
      */
     public boolean isReadOnly(String fieldName)
             throws DBException {
@@ -5336,6 +4596,7 @@
      * @return True if the field is 'secret', false if it is not
      * @throws DBException If there is no such field.
      * @see #setSecret(String)
+     * @deprecated since 5.6, use DBField.isSecret()
      */
     public boolean isSecret(String fieldName)
             throws DBException {
@@ -5353,6 +4614,7 @@
      * @return True of the field is virtual, false if it is not
      * @throws DBException If there is no such field
      * @see #addVirtualField(String, String, int, String)
+     * @deprecated since 5.6, use DBField.isVirtual()
      */
     public boolean isVirtual(String fieldName)
             throws DBException {
@@ -5711,20 +4973,6 @@
 
 
     /**
-     * Removes an attribute from a particular field. This is a global operation,
-     * ie it affects ALL fields
-     *
-     * @param fieldName     The field name to remove the attribute from.
-     * @param attributeName The name of the attribute to remove.
-     * @deprecated Since Expresso 5.1
-     *             Use getFieldMetaData(fieldNAme).removeAttribute(attributeName) instead
-     */
-    public void removeAttribute(String fieldName, String attributeName) throws DBException {
-        getDef().removeAttribute(fieldName, attributeName);
-    }
-
-
-    /**
      * Get a particular record from the database into this object's fields
      * Key fields for this object must be set; throws otherwise
      *
@@ -6149,34 +5397,6 @@
         attributes.put(attribName, attribValue);
     } /* setAttribute(String, Object) */
 
-    /**
-     * <p>Set an "attribute", or general-purpose meta-data field, for the specified
-     * field. This can be used to store "formatting hints" for this field,
-     * for example, such as "checkbox", which can be used by views to render
-     * forms more appropriately.<br />
-     * <b>Note:</b> The attributes for fields are static across all DBObjects of a particular
-     * type.  It does not apply to a single instance of your data.</p>
-     * <p/>
-     * <p>Currently recognized attributes include:</p>
-     * <ul><li>ATTRIBUTE_ERROR = Y if there's an error validating a particular
-     * field</li>
-     * <li>ATTRIBUTE_ERROR_MESSAGE = A message to display when validation of
-     * a field fails</li>
-     * <p/>
-     * </ul>
-     *
-     * @param fieldName   The field name for this field
-     * @param attribName  The name of the attribute
-     * @param attribValue The object to set for this attribute
-     * @deprecated Since Expresso 5.1
-     *             Use getFieldMetaData(fieldName).setAttribute(attributeName,attribValue) instead
-     */
-    public synchronized void setAttribute(String fieldName, String attribName,
-                                          Object attribValue)
-            throws DBException {
-        getDef().setAttribute(fieldName, attribName, attribValue);
-    } /* setAttribute(String, String) */
-
 
     /**
      * Read the configuration table to determine the max size
@@ -7092,22 +6312,6 @@
         oneField.setReadOnly();
     } /* setReadOnly(String) */
 
-
-    /**
-     * Specify which schema this DB object belongs to. This is
-     * necessary when using the local-langauge strings in the
-     * DB object for field names, descriptions, etc. The schema
-     * will be assumed to be Expresso's schema if not otherwise
-     * set.
-     *
-     * @param schemaName The schema classname to set
-     * @see #setSchema(com.jcorporate.expresso.core.dbobj.Schema)
-     * @deprecated after v5.3, this info is set automatically by framework; you do not need to call this for any dbobject that is added to a schema (and all should be part of some schema)
-     */
-    public synchronized void setSchema(String schemaName)
-            throws DBException {
-        getDef().setSchema(schemaName);
-    } /* setSchema(String) */
 
     /**
      * Specify which schema this DB object belongs to. This is


More information about the cvs mailing list