
com.draagon.meta.field.StringField Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of metaobjects-metadata Show documentation
Show all versions of metaobjects-metadata Show documentation
MetaObjects for Model-driven development - MetaData Libraries
The newest version!
/*
* Copyright 2004 Draagon Software LLC. All Rights Reserved.
*
* This software is the proprietary information of Draagon Software LLC.
* Use is subject to license terms.
*/
package com.draagon.meta.field;
import com.draagon.meta.*;
import com.draagon.meta.attr.StringAttribute;
/**
* A String Field.
*
* @version 2.0
* @author Doug Mealing
*/
@SuppressWarnings("serial")
public class StringField extends PrimitiveField {
public final static String SUBTYPE_STRING = "string";
public StringField( String name ) {
super( SUBTYPE_STRING, name, DataTypes.STRING );
}
/**
* Manually Create a StringField
* @param name Name of the field
* @param defaultValue Default value for the field
* @return New StringField
*/
public static StringField create( String name, String defaultValue ) {
StringField f = new StringField( name );
if ( defaultValue != null ) {
f.addMetaAttr(StringAttribute.create( ATTR_DEFAULT_VALUE, defaultValue ));
}
return f;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy