org.sandev.sandbuild
Class SandPersistDef

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.sandev.sandbuild.SandTask
              extended by org.sandev.sandbuild.SandPersistDef

public class SandPersistDef
extends SandTask

A sandpersist declaration provides information about application persistence. This includes the name of the StructMapper, which tells what kind of persistence and how the application data should be mapped. The sandpersist declaration also provides other global persistence settings, see the comments on each field for details.

It is possible to manage separate persistency for development and production builds by using two sandpersist declarations with different values for requiredMode. Which sandpersist is activated is then controlled by the sandevBuildMode build property.


Field Summary
protected  java.lang.String converterClass
          The fully qualified name of the Converter that will be used to convert forward outdated storage structures.
protected  java.lang.String dataSource
          The persistence technology lookup handle.
protected  java.lang.String importExportSourceName
          Default source/sink for data import/export.
protected  java.lang.String mappedStructPrefix
          An additional prefix to be applied to all mapped struct names returned by the StructMapper.
protected  java.lang.String persisterClass
          The fully qualified name of the Persister that will be used for persistence and query processing.
protected  java.lang.String requiredMode
          The value of the sandevBuildMode property that must be present for this sandpersist declaration to be active.
protected  java.lang.String stringPersistConverterClass
          The fully qualified name of the class which will be used to convert non-reference array fields and unsupported persistency objects into String values for storage.
protected  java.lang.String structMapperClass
          The fully qualified name of the StructMapper to use.
protected  java.lang.String uniqueIDManagerClass
          The fully qualified name of the UniqueIDManager that will be used for persistence processing.
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
SandPersistDef()
           
 
Method Summary
 void execute()
          Add ourselves to our project so the generators have access to this information.
 java.lang.String getConverterClass()
          accessor for converterClass
 java.lang.String getDataSource()
          accessor for dataSource
 java.lang.String getImportExportSourceName()
          accessor for importExportSourceName
 java.lang.String getMappedStructPrefix()
          accessor for mappedStructPrefix
 java.lang.String getPersisterClass()
          accessor for persisterClass
 java.lang.String getRequiredMode()
          accessor for requiredMode
 java.lang.String getStringPersistConverterClass()
          accessor for stringPersistConverterClass
 java.lang.String getStructMapperClass()
          accessor for structMapperClass
 java.lang.String getUniqueIDManagerClass()
          accessor for uniqueIDManagerClass
 void setConverterClass(java.lang.String val)
          mutator for converterClass
 void setDataSource(java.lang.String val)
          mutator for dataSource
 void setImportExportSourceName(java.lang.String val)
          mutator for importExportSourceName
 void setMappedStructPrefix(java.lang.String val)
          mutator for mappedStructPrefix
 void setPersisterClass(java.lang.String val)
          mutator for persisterClass
 void setRequiredMode(java.lang.String val)
          mutator for requiredMode
 void setStringPersistConverterClass(java.lang.String val)
          mutator for stringPersistConverterClass
 void setStructMapperClass(java.lang.String val)
          mutator for structMapperClass
 void setUniqueIDManagerClass(java.lang.String val)
          mutator for uniqueIDManagerClass
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

structMapperClass

protected java.lang.String structMapperClass
The fully qualified name of the StructMapper to use.


mappedStructPrefix

protected java.lang.String mappedStructPrefix
An additional prefix to be applied to all mapped struct names returned by the StructMapper. This optional prefixing allows several deployments to use the same StructMapper and coexist in the same deployment environment while keeping their storage separate. This is typically set to the value of the DeploymentPrefix build property.


stringPersistConverterClass

protected java.lang.String stringPersistConverterClass
The fully qualified name of the class which will be used to convert non-reference array fields and unsupported persistency objects into String values for storage. This field is only required if your application uses @sand.flags stringpersist processing.


dataSource

protected java.lang.String dataSource
The persistence technology lookup handle. This may be a JDBC data source for a JDBC Persister, or any other value that the Persister requires to identify the persistent store.


persisterClass

protected java.lang.String persisterClass
The fully qualified name of the Persister that will be used for persistence and query processing. See the Persister documentation for details.


uniqueIDManagerClass

protected java.lang.String uniqueIDManagerClass
The fully qualified name of the UniqueIDManager that will be used for persistence processing. See the UniqueIDManager documentation for details.


converterClass

protected java.lang.String converterClass
The fully qualified name of the Converter that will be used to convert forward outdated storage structures. See the Converter documentation for details.


importExportSourceName

protected java.lang.String importExportSourceName
Default source/sink for data import/export. If a DataImportExport message comes in without a source specified, then this value is used by default.


requiredMode

protected java.lang.String requiredMode
The value of the sandevBuildMode property that must be present for this sandpersist declaration to be active. If this is null (the default) or the empty string then the persistence declaration is always active.

Constructor Detail

SandPersistDef

public SandPersistDef()
Method Detail

getStructMapperClass

public java.lang.String getStructMapperClass()
accessor for structMapperClass


setStructMapperClass

public void setStructMapperClass(java.lang.String val)
mutator for structMapperClass


getMappedStructPrefix

public java.lang.String getMappedStructPrefix()
accessor for mappedStructPrefix


setMappedStructPrefix

public void setMappedStructPrefix(java.lang.String val)
mutator for mappedStructPrefix


getStringPersistConverterClass

public java.lang.String getStringPersistConverterClass()
accessor for stringPersistConverterClass


setStringPersistConverterClass

public void setStringPersistConverterClass(java.lang.String val)
mutator for stringPersistConverterClass


getDataSource

public java.lang.String getDataSource()
accessor for dataSource


setDataSource

public void setDataSource(java.lang.String val)
mutator for dataSource


getPersisterClass

public java.lang.String getPersisterClass()
accessor for persisterClass


setPersisterClass

public void setPersisterClass(java.lang.String val)
mutator for persisterClass


getUniqueIDManagerClass

public java.lang.String getUniqueIDManagerClass()
accessor for uniqueIDManagerClass


setUniqueIDManagerClass

public void setUniqueIDManagerClass(java.lang.String val)
mutator for uniqueIDManagerClass


getConverterClass

public java.lang.String getConverterClass()
accessor for converterClass


setConverterClass

public void setConverterClass(java.lang.String val)
mutator for converterClass


getImportExportSourceName

public java.lang.String getImportExportSourceName()
accessor for importExportSourceName


setImportExportSourceName

public void setImportExportSourceName(java.lang.String val)
mutator for importExportSourceName


getRequiredMode

public java.lang.String getRequiredMode()
accessor for requiredMode


setRequiredMode

public void setRequiredMode(java.lang.String val)
mutator for requiredMode


execute

public void execute()
             throws org.apache.tools.ant.BuildException
Add ourselves to our project so the generators have access to this information.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException