public static ManagedProperty createProperty(String name,
MetaType type, String displayName, String description,
boolean mandatory, boolean readOnly, Serializable defaultValue) {
DefaultFieldsImpl fields = new DefaultFieldsImpl(name);
fields.setDescription(description);
fields.setField(Fields.MAPPED_NAME,displayName);
fields.setMetaType(type);
fields.setField(Fields.MANDATORY, SimpleValueSupport.wrap(mandatory));
fields.setField(Fields.READ_ONLY, SimpleValueSupport.wrap(readOnly));
fields.setField(TEIID_PROPERTY, SimpleValueSupport.wrap(true));
if (defaultValue != null) {
fields.setField(Fields.DEFAULT_VALUE, SimpleValueSupport.wrap(defaultValue));
}
return new ManagedPropertyImpl(fields);
}