org.exolab.castor.builder
Class FieldInfoFactory

java.lang.Object
  extended byorg.exolab.castor.builder.FieldInfoFactory

public class FieldInfoFactory
extends java.lang.Object

This class is used as a factory to create all the FieldInfo objects used by the source generator. You may override the FieldInfo classes and this factory for specific adaptions.

Version:
$Revision: 1.3 $ $Date: 2003/09/12 08:22:50 $
Author:
Frank Thelen, Arnaud Blandin

Constructor Summary
FieldInfoFactory()
          Creates a new FieldInfoFactory.
FieldInfoFactory(java.lang.String collectionName)
           
 
Method Summary
 CollectionInfo createCollection(org.exolab.castor.builder.types.XSType contentType, java.lang.String name, java.lang.String elementName)
           
 CollectionInfo createCollection(org.exolab.castor.builder.types.XSType contentType, java.lang.String name, java.lang.String elementName, java.lang.String collectionName)
           
 FieldInfo createFieldInfo(org.exolab.castor.builder.types.XSType type, java.lang.String name)
           
 IdentityInfo createIdentity(java.lang.String name)
           
 void setBoundProperties(boolean bound)
          Sets whether or not the fields should be bound properties
 void setCreateExtraMethods(boolean extraMethods)
          Sets whether or not to create extra collection methods for accessing the actual collection
 void setReferenceMethodSuffix(java.lang.String suffix)
          Sets the method suffix (ending) to use when creating the extra collection methods.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldInfoFactory

public FieldInfoFactory()
Creates a new FieldInfoFactory. The default collection used will be Java 1 type.


FieldInfoFactory

public FieldInfoFactory(java.lang.String collectionName)
Method Detail

createIdentity

public IdentityInfo createIdentity(java.lang.String name)

createCollection

public CollectionInfo createCollection(org.exolab.castor.builder.types.XSType contentType,
                                       java.lang.String name,
                                       java.lang.String elementName)

createCollection

public CollectionInfo createCollection(org.exolab.castor.builder.types.XSType contentType,
                                       java.lang.String name,
                                       java.lang.String elementName,
                                       java.lang.String collectionName)

createFieldInfo

public FieldInfo createFieldInfo(org.exolab.castor.builder.types.XSType type,
                                 java.lang.String name)

setBoundProperties

public void setBoundProperties(boolean bound)
Sets whether or not the fields should be bound properties

Parameters:
bound - a boolean that when true indicates the FieldInfo should have the bound property enabled.

setCreateExtraMethods

public void setCreateExtraMethods(boolean extraMethods)
Sets whether or not to create extra collection methods for accessing the actual collection

Parameters:
extraMethods - a boolean that when true indicates that extra collection accessor methods should be created. False by default.
See Also:
setReferenceMethodSuffix

setReferenceMethodSuffix

public void setReferenceMethodSuffix(java.lang.String suffix)
Sets the method suffix (ending) to use when creating the extra collection methods.

Parameters:
suffix - the method suffix to use when creating the extra collection methods. If null or emtpty the default value, as specified in CollectionInfo will be used.
See Also:
setCreateExtraMethods


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com