CmpResourcepublic class CmpResource extends com.sun.enterprise.tools.common.dd.SunBaseBean This generated bean class CmpResource matches the schema element cmp-resource
Generated on Wed Aug 13 10:43:32 PDT 2003 |
Fields Summary |
---|
static Vector | comparators | public static final String | JNDI_NAME | public static final String | DEFAULT_RESOURCE_PRINCIPAL | public static final String | PROPERTY | public static final String | CREATE_TABLES_AT_DEPLOY | public static final String | DROP_TABLES_AT_UNDEPLOY | public static final String | DATABASE_VENDOR_NAME | public static final String | SCHEMA_GENERATOR_PROPERTIES |
Constructors Summary |
---|
public CmpResource() // NOI18N
this(Common.USE_DEFAULT_VALUES);
| public CmpResource(int options)
super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
// Properties (see root bean comments for the bean graph)
this.createProperty("jndi-name", // NOI18N
JNDI_NAME,
Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
String.class);
this.createProperty("default-resource-principal", // NOI18N
DEFAULT_RESOURCE_PRINCIPAL,
Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
DefaultResourcePrincipal.class);
this.createProperty("property", // NOI18N
PROPERTY,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
PropertyElement.class);
this.createProperty("create-tables-at-deploy", // NOI18N
CREATE_TABLES_AT_DEPLOY,
Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
String.class);
this.createProperty("drop-tables-at-undeploy", // NOI18N
DROP_TABLES_AT_UNDEPLOY,
Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
String.class);
this.createProperty("database-vendor-name", // NOI18N
DATABASE_VENDOR_NAME,
Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
String.class);
this.createProperty("schema-generator-properties", // NOI18N
SCHEMA_GENERATOR_PROPERTIES,
Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
SchemaGeneratorProperties.class);
this.initialize(options);
|
Methods Summary |
---|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
| public int | addPropertyElement(com.sun.enterprise.tools.common.dd.ejb.PropertyElement value)
return this.addValue(PROPERTY, value);
| public void | dump(java.lang.StringBuffer str, java.lang.String indent)
String s;
Object o;
org.netbeans.modules.schema2beans.BaseBean n;
str.append(indent);
str.append("JndiName"); // NOI18N
str.append(indent+"\t"); // NOI18N
str.append("<"); // NOI18N
s = this.getJndiName();
str.append((s==null?"null":s.trim())); // NOI18N
str.append(">\n"); // NOI18N
this.dumpAttributes(JNDI_NAME, 0, str, indent);
str.append(indent);
str.append("DefaultResourcePrincipal"); // NOI18N
n = (org.netbeans.modules.schema2beans.BaseBean) this.getDefaultResourcePrincipal();
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(DEFAULT_RESOURCE_PRINCIPAL, 0, str, indent);
str.append(indent);
str.append("PropertyElement["+this.sizePropertyElement()+"]"); // NOI18N
for(int i=0; i<this.sizePropertyElement(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getPropertyElement(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(PROPERTY, i, str, indent);
}
str.append(indent);
str.append("CreateTablesAtDeploy"); // NOI18N
str.append(indent+"\t"); // NOI18N
str.append("<"); // NOI18N
s = this.getCreateTablesAtDeploy();
str.append((s==null?"null":s.trim())); // NOI18N
str.append(">\n"); // NOI18N
this.dumpAttributes(CREATE_TABLES_AT_DEPLOY, 0, str, indent);
str.append(indent);
str.append("DropTablesAtUndeploy"); // NOI18N
str.append(indent+"\t"); // NOI18N
str.append("<"); // NOI18N
s = this.getDropTablesAtUndeploy();
str.append((s==null?"null":s.trim())); // NOI18N
str.append(">\n"); // NOI18N
this.dumpAttributes(DROP_TABLES_AT_UNDEPLOY, 0, str, indent);
str.append(indent);
str.append("DatabaseVendorName"); // NOI18N
str.append(indent+"\t"); // NOI18N
str.append("<"); // NOI18N
s = this.getDatabaseVendorName();
str.append((s==null?"null":s.trim())); // NOI18N
str.append(">\n"); // NOI18N
this.dumpAttributes(DATABASE_VENDOR_NAME, 0, str, indent);
str.append(indent);
str.append("SchemaGeneratorProperties"); // NOI18N
n = (org.netbeans.modules.schema2beans.BaseBean) this.getSchemaGeneratorProperties();
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(SCHEMA_GENERATOR_PROPERTIES, 0, str, indent);
| public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("CmpResource\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
| public java.lang.String | getCreateTablesAtDeploy()
return (String)this.getValue(CREATE_TABLES_AT_DEPLOY);
| public java.lang.String | getDatabaseVendorName()
return (String)this.getValue(DATABASE_VENDOR_NAME);
| public com.sun.enterprise.tools.common.dd.DefaultResourcePrincipal | getDefaultResourcePrincipal()
return (DefaultResourcePrincipal)this.getValue(DEFAULT_RESOURCE_PRINCIPAL);
| public java.lang.String | getDropTablesAtUndeploy()
return (String)this.getValue(DROP_TABLES_AT_UNDEPLOY);
| public java.lang.String | getJndiName()
return (String)this.getValue(JNDI_NAME);
| public com.sun.enterprise.tools.common.dd.ejb.PropertyElement[] | getPropertyElement()
return (PropertyElement[])this.getValues(PROPERTY);
| public com.sun.enterprise.tools.common.dd.ejb.PropertyElement | getPropertyElement(int index)
return (PropertyElement)this.getValue(PROPERTY, index);
| public SchemaGeneratorProperties | getSchemaGeneratorProperties()
return (SchemaGeneratorProperties)this.getValue(SCHEMA_GENERATOR_PROPERTIES);
| void | initialize(int options)
| public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
| public int | removePropertyElement(com.sun.enterprise.tools.common.dd.ejb.PropertyElement value)
return this.removeValue(PROPERTY, value);
| public void | setCreateTablesAtDeploy(java.lang.String value)
this.setValue(CREATE_TABLES_AT_DEPLOY, value);
| public void | setDatabaseVendorName(java.lang.String value)
this.setValue(DATABASE_VENDOR_NAME, value);
| public void | setDefaultResourcePrincipal(com.sun.enterprise.tools.common.dd.DefaultResourcePrincipal value)
this.setValue(DEFAULT_RESOURCE_PRINCIPAL, value);
| public void | setDropTablesAtUndeploy(java.lang.String value)
this.setValue(DROP_TABLES_AT_UNDEPLOY, value);
| public void | setJndiName(java.lang.String value)
this.setValue(JNDI_NAME, value);
| public void | setPropertyElement(com.sun.enterprise.tools.common.dd.ejb.PropertyElement[] value)
this.setValue(PROPERTY, value);
| public void | setPropertyElement(int index, com.sun.enterprise.tools.common.dd.ejb.PropertyElement value)
this.setValue(PROPERTY, index, value);
| public void | setSchemaGeneratorProperties(SchemaGeneratorProperties value)
this.setValue(SCHEMA_GENERATOR_PROPERTIES, value);
| public int | sizePropertyElement()
return this.size(PROPERTY);
| public void | validate()
boolean restrictionFailure = false;
// Validating property jndiName
if (getJndiName() == null) {
throw new org.netbeans.modules.schema2beans.ValidateException("getJndiName() == null", "jndiName", this); // NOI18N
}
// Validating property defaultResourcePrincipal
if (getDefaultResourcePrincipal() != null) {
getDefaultResourcePrincipal().validate();
}
// Validating property propertyElement
for (int _index = 0; _index < sizePropertyElement(); ++_index) {
com.sun.enterprise.tools.common.dd.ejb.PropertyElement element = getPropertyElement(_index);
if (element != null) {
element.validate();
}
}
// Validating property createTablesAtDeploy
if (getCreateTablesAtDeploy() != null) {
}
// Validating property dropTablesAtUndeploy
if (getDropTablesAtUndeploy() != null) {
}
// Validating property databaseVendorName
if (getDatabaseVendorName() != null) {
}
// Validating property schemaGeneratorProperties
if (getSchemaGeneratorProperties() != null) {
getSchemaGeneratorProperties().validate();
}
|
|