Java Reference
In-Depth Information
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
« IF !features.typeSelect(dnc::Association).collect(a |
a.upperBound == -1).isEmpty-»
import javax.persistence.OneToMany;« ENDIF »
« IF !features.typeSelect(dnc::Association).collect(a |
a.upperBound == 1).isEmpty-»
import javax.persistence.OneToOne;« ENDIF »
« IF features.typeSelect(oocore::Reference).collect(a |
a.opposite.metaType == dnc::Association && a.opposite.upperBound ==
-1).isEmpty-»
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;« ENDIF »
/**
* « IF description.length > 0-»«description-»« ELSE »TODO:
Enter description of the class here...« ENDIF »
*
* @generated
*/
@Entity
@Table(name="« EXPAND toColumnName FOR name-»")
public class «name» « EXPAND extends FOR this -»implements
java.io.Serializable« EXPAND implements FOR this -» {
« EXPAND idAttribute FOR this
« EXPAND attribute FOREACH features.typeSelect(oocore::Attribute)-»
« EXPAND reference FOREACH features.typeSelect(oocore::Reference)-»
« EXPAND idGetter FOR this
« FOREACH features.typeSelect(oocore::StructuralFeature) AS feature-»
« EXPAND getter FOR feature-»
« EXPAND setter FOR feature-»
« ENDFOREACH »
« EXPAND method FOREACH features.typeSelect(oocore::Operation)-»
« EXPAND additions-»
}
« ENDFILE »
« ENDDEFINE »
« DEFINE extends FOR oocore::Class-»
« IF !superclasses.isEmpty»extends « EXPAND superClass FOR
superclasses.select(c | c.interface == false ).first()-»« ENDIF
« ENDDEFINE »
« DEFINE implements FOR oocore::Class-»
« IF superclasses.select(c | c.interface == true ).size > 0», « EXPAND
superClass FOREACH superclasses.select(c | c.interface == true )
SEPARATOR ","-»« ENDIF
« ENDDEFINE »
« DEFINE superClass FOR oocore::Class-»
«fullyQualifiedName( this )-»
« ENDDEFINE »
Search WWH ::




Custom Search