[cvs] expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects BaseDataObject.java DataExecutorInterface.java DataField.java DataFieldMetaData.java DataObject.java DataObjectMetaData.java DefaultDataField.java SynchronizedDataObject.java

JCorporate Ltd jcorp at jcorp2.servlets.net
Fri Sep 17 17:06:10 PDT 2004


Update of /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects
In directory jcorp2.servlets.net:/tmp/cvs-serv12386

Modified Files:
	BaseDataObject.java DataExecutorInterface.java DataField.java 
	DataFieldMetaData.java DataObject.java DataObjectMetaData.java 
	DefaultDataField.java SynchronizedDataObject.java 
Log Message:
Yves Henri AMAIZO's contributions.
Commited by Raul Davidovich on 20040918


Index: SynchronizedDataObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/SynchronizedDataObject.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SynchronizedDataObject.java	10 Oct 2003 23:33:44 -0000	1.4
--- SynchronizedDataObject.java	18 Sep 2004 00:06:08 -0000	1.5
***************
*** 68,71 ****
--- 68,72 ----
  
  import com.jcorporate.expresso.core.db.DBException;
+ import org.apache.oro.text.regex.Pattern;
  
  import java.util.ArrayList;
***************
*** 508,511 ****
      }
  
  
! }
\ No newline at end of file
--- 509,540 ----
      }
  
+ 	/**
+ 	 * Set a regular expression "mask" for this base data object that specifies it's
+ 	 * valid values.  The mask should already be compiled by the regular
+ 	 * expression compiler
+ 	 * @param newMask The compiled regular expression mask
+ 	 *
+ 	 */
+ 	public void setGlobalMask(Pattern newMask) {
+ 		target.setGlobalMask(newMask);
+ 	}
  
! 	/**
! 	 * Get the compiled regular expression for this base data object.
! 	 * @return the precompiled regular expression mask
! 	 */
! 	public Pattern getGlobalMask() {
! 		return target.getGlobalMask();
! 	}
! 
! 
! 	/**
! 	 * Return boolean if the data object has a mask set
! 	 *
! 	 * @return True if the data object mask is set, else false if it is not
! 	 */
! 	public boolean isGlobalMasked() {
! 		return target.isGlobalMasked();
! 	} /* isMasked() */
! 
! }

Index: DataObjectMetaData.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/DataObjectMetaData.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** DataObjectMetaData.java	7 Aug 2004 18:45:22 -0000	1.8
--- DataObjectMetaData.java	18 Sep 2004 00:06:08 -0000	1.9
***************
*** 473,475 ****
       */
      public String getDescription(java.util.Locale l);
! }
\ No newline at end of file
--- 473,500 ----
       */
      public String getDescription(java.util.Locale l);
! 
! 
! 	/**
! 	 * Retrieve the database schema name associated with this data object
! 	 *
! 	 * @return the className of the schema associated with this DBObject
! 	 */
! 	public String getTargetDbSchema();
! 
! 	/**
! 	 * Retrieve the database catalogue name associated with this data object
! 	 *
! 	 * @return the className of the schema associated with this DBObject
! 	 */
! 	public String getTargetDbCatalog();  
! 
! 
! 	/**
! 	 * Retrieve the full table name associated with this data object
! 	 *
! 	 * @return the className of the schema associated with this DBObject
! 	 */
! 	public String getTargetSQLTable(String dataContext) throws DataException;
! 
! 
! }

Index: DataExecutorInterface.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/DataExecutorInterface.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** DataExecutorInterface.java	5 Jun 2003 08:41:20 -0000	1.8
--- DataExecutorInterface.java	18 Sep 2004 00:06:08 -0000	1.9
***************
*** 125,128 ****
--- 125,154 ----
      public void addBatch(List valueObjectList) throws DataException, DuplicateKeyException;
  
+ 	/**
+ 	 * Updates an entire batch of <code>DataObject</code>s
+ 	 * @param valueObjectList A list of <code>DataObject</code>s to update to the underlying
+ 	 * data source
+ 	 * @throws DataException upon error updating the data source
+ 	 */
+ 	public void deleteBatch(List valueObjectList) throws DataException;
+ 
+ 	/**
+ 	 * Updates an entire batch of <code>DataObject</code>s
+ 	 * @param valueObjectList A list of <code>DataObject</code>s to update to the underlying
+ 	 * data source
+ 	 * @param updateChangedFieldsOnly flag to signify if only fields whose value
+ 	 *         has changed should be included in the update.
+ 	 * @throws DataException upon error updating the data source
+ 	 */
+ 	public void deleteBatch(List valueObjectList, boolean deleteWithSetFieldsOnly) throws DataException;
+ 
+ 	/**
+ 	 * Takes a <code>DataObject</code> and updates it to the underlying data source
+ 	 * @param valueObject the <code>DataObject</code> to update.
+ 	 * @param updateChangedFieldsOnly flag to signify if only fields whose value
+ 	 *         has changed should be included in the update.
+ 	 * @throws DataException upon error updating the object to the data source
+ 	 */
+ 
      /**
       * Updates an entire batch of <code>DataObject</code>s
***************
*** 132,134 ****
       */
      public void updateBatch(List valueObjectList) throws DataException;
! }
\ No newline at end of file
--- 158,195 ----
       */
      public void updateBatch(List valueObjectList) throws DataException;
! 
! 	/**
! 	 * Updates an entire batch of <code>DataObject</code>s
! 	 * @param valueObjectList A list of <code>DataObject</code>s to update to the underlying
! 	 * data source
!      * @param updateChangedFieldsOnly flag to signify if only fields whose value
!      *         has changed should be included in the update.
! 	 * @throws DataException upon error updating the data source
! 	 */
! 	public void updateBatch(List valueObjectList, boolean updateChangedFieldsOnly) throws DataException;
! 
! 	/**
! 	 * Takes a <code>DataObject</code> and updates it to the underlying data source
! 	 * @param valueObject the <code>DataObject</code> to update.
! 	 * @param updateChangedFieldsOnly flag to signify if only fields whose value
! 	 *         has changed should be included in the update.
! 	 * @throws DataException upon error updating the object to the data source
! 	 */
! 	public void updateAll(DataObject valueObject, boolean updateChangedCache) throws DataException;
! 
! 	/**
! 	 * Takes a <code>DataObject</code> and deletes it from the underlying data source
! 	 * @param valueObject the <code>DataObject</code> to delete.
! 	 * @throws DataException upon error deleting the objects to the data source
! 	 */
! 	public void deleteAll(DataObject valueObject, boolean deleteChangedCache) throws DataException;
! 	/**
! 	 * Takes a <code>DataObject</code> and run it from the underlying data source
! 	 * @param valueObject the <code>DataObject</code> to run.
! 	 * @throws DataException upon error retriving the object from the data source
! 	 */
! 	public void runStoreProcedure(DataObject valueObject) throws DataException;
! 
! 
! 
! }

Index: DataObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/DataObject.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** DataObject.java	6 May 2004 09:15:47 -0000	1.17
--- DataObject.java	18 Sep 2004 00:06:08 -0000	1.18
***************
*** 67,70 ****
--- 67,71 ----
  import com.jcorporate.expresso.core.cache.Cacheable;
  import com.jcorporate.expresso.core.db.DBException;
+ import org.apache.oro.text.regex.Pattern;
  
  import java.util.ArrayList;
***************
*** 400,402 ****
       */
      public int count() throws DBException;
! }
\ No newline at end of file
--- 401,422 ----
       */
      public int count() throws DBException;
! 
! 	/**
! 	 * Sets the DataObject's global mask
! 	 * @param newGlobalMask the New global mask object
! 	 */
! 	public void setGlobalMask(Pattern newGlobalMask);
! 
! 	/**
! 	 * Retrieve the DBObject's current global mask
! 	 * @return String
! 	 */
! 	public Pattern getGlobalMask();
! 
! 	/**
! 	 * Return boolean if the data object has a mask set
! 	 *
! 	 * @return True if the data object mask is set, else false if it is not
! 	 */
! 	public boolean isGlobalMasked();
! }

Index: DataField.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/DataField.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** DataField.java	12 Aug 2004 20:01:16 -0000	1.15
--- DataField.java	18 Sep 2004 00:06:08 -0000	1.16
***************
*** 75,78 ****
--- 75,79 ----
   * value, and attribute holdings.
   * @author Michael Rimov
+  * @version $Revision$ on  $Date$
   * @since Expresso 5.0.1
   */
***************
*** 155,159 ****
  	/**
  	 * Make sure the value of the field is valid.
! 	 * 
  	 * @throws DataException if the field value is not valid
  	 */
--- 156,160 ----
  	/**
  	 * Make sure the value of the field is valid.
! 	 *
  	 * @throws DataException if the field value is not valid
  	 */
***************
*** 229,231 ****
       */
      public void cacheIsChangedComparison();
! }
\ No newline at end of file
--- 230,232 ----
       */
      public void cacheIsChangedComparison();
! }

Index: DataFieldMetaData.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/DataFieldMetaData.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** DataFieldMetaData.java	10 Oct 2003 23:33:44 -0000	1.9
--- DataFieldMetaData.java	18 Sep 2004 00:06:08 -0000	1.10
***************
*** 201,204 ****
--- 201,218 ----
      public boolean isBinaryObjectType();
  
+ 	/**
+ 	 * Is it a BLOB?  This is calculated by if it is a long object
+ 	 * and is NOT a character long object.
+ 	 * @return boolean True if it is
+ 	 */
+ 	public boolean isLongBinaryType();
+ 
+ 	/**
+ 	 * Is it a BLOB?  This is calculated by if it is a long object
+ 	 * and is NOT a character long object.
+ 	 * @return boolean True if it is
+ 	 */
+ 	public boolean isLongCharacterType();
+ 
      /**
       * is the field a quoted text field?
***************
*** 284,287 ****
--- 298,308 ----
      public boolean isVirtual();
  
+ 	/**
+ 	 * Return boolean if the field has a mask set
+ 	 *
+ 	 * @return True if the field mask is set, else false if it is not
+ 	 */
+ 	public boolean isMasked();
+ 
      /**
       * Set this field as a key field (or not)
***************
*** 417,419 ****
      public Iterator getAttributesIterator();
  
! }
\ No newline at end of file
--- 438,440 ----
      public Iterator getAttributesIterator();
  
! }

Index: DefaultDataField.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/DefaultDataField.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** DefaultDataField.java	13 Aug 2004 06:08:29 -0000	1.30
--- DefaultDataField.java	18 Sep 2004 00:06:08 -0000	1.31
***************
*** 97,104 ****
  /**
   * Default implementation of the DataField interface.  This class provides some
!  * basic conversion capabilities between different Java types as well as
!  * provides all use change logging capabilities.
!  *
   * @author Michael Rimov
   * @since Expresso 5.0
   */
--- 97,104 ----
  /**
[...1288 lines suppressed...]
!          * synchronization.
!          *
!          * @return PatternMatcher
!          */
!         protected PatternMatcher getPatternMatcher()
!         {
!                 return (PatternMatcher) patternMatcher.get();
!         }
  
      /**
!      * reset 'original' value and isChanged flags;
!      * call when add(), retrieve() or update() has occurred, and currentValue of data fields should be considered 'original value' for purposes of determining 'isChanged'
       */
!     public void cacheIsChangedComparison() {
!         originalValue = currentValue;
!         isChanged = false;
      }
  
  }
+ 

Index: BaseDataObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/BaseDataObject.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** BaseDataObject.java	12 Sep 2003 05:53:11 -0000	1.8
--- BaseDataObject.java	18 Sep 2004 00:06:08 -0000	1.9
***************
*** 64,67 ****
--- 64,68 ----
  package com.jcorporate.expresso.core.dataobjects;
  
+ import org.apache.oro.text.regex.Pattern;
  
  
***************
*** 80,83 ****
--- 81,85 ----
      protected String currentStatus = BaseDataObject.STATUS_NEW;
  
+ 	protected Pattern globalMask = null;
  
      public BaseDataObject() {
***************
*** 125,127 ****
          return currentStatus;
      } /* getStatus() */
! }
\ No newline at end of file
--- 127,166 ----
          return currentStatus;
      } /* getStatus() */
! 
! 	/**
! 	 * Set a regular expression "mask" for this base data object that specifies it's
! 	 * valid values.  The mask should already be compiled by the regular
! 	 * expression compiler
! 	 * @param newMask The compiled regular expression mask
! 	 *
! 	 *
! 	 * author Yves Henri AMAIZO <amy_amaizo at compuserve.com>
! 	 */
! 	public void setGlobalMask(Pattern newMask) {
! 		globalMask = newMask;
! 	}
! 
! 	/**
! 	 * Get the compiled regular expression for this base data object.
! 	 * @return the precompiled regular expression mask
! 	 *
! 	 * author Yves Henri AMAIZO <amy_amaizo at compuserve.com>
! 	 */
! 	public Pattern getGlobalMask() {
! 		return globalMask;
! 	}
! 
! 
! 	/**
! 	 * Return boolean if the data object has a mask set
! 	 *
! 	 * @return True if the data object mask is set, else false if it is not
! 	 *
! 	 * author Yves Henri AMAIZO <amy_amaizo at compuserve.com>
! 	 */
! 	public boolean isGlobalMasked() {
! 		return globalMask != null;
! 	} /* isMasked() */
! 
! 
! }



More information about the cvs mailing list