Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02

weblogic.ejbgen
Annotation Type Relation


@Retention(value=CLASS)
@Target(value=java.lang.annotation.ElementType.TYPE)
public @interface Relation


Required Element Summary
 Relation.Multiplicity multiplicity
          (one|many) Sets the multiplicity of the relationship.
 String name
          Specifies the name of the relationship.
 
Optional Element Summary
 Constants.Bool cascadeDelete
          (True|False)
 String cmrField
          Specifies the CMR field where this relationship will be kept.
 Constants.Bool dbCascadeDelete
          (True|False) Determines whether a cascade delete will use the built-in cascade delete facilities of the underlying DBMS.
 String fkColumn
          Needed only in a relationship having at least one One side.
 String foreignKeyTable
          The name of a DBMS table that contains a foreign-key.
 String groupName
          Specifies the group name of the relationshop.
 String id
          The identity of this tag (used for tag inheritance only).
 String joinTable
          Only needed in a Many-Many relationship.
 String jointTable
          Deprecated. Use Relation.joinTable() instead.
 String primaryKeyTable
          The name of a DBMS table that contains a primary-key.
 String roleName
          The name of this role (such as "ParentHasChildren").
 String targetEjb
          Specifies the EJB name of the target of this relationship, which is used to generate the role name.
 

Element Detail

multiplicity

public abstract Relation.Multiplicity multiplicity
(one|many) Sets the multiplicity of the relationship.


name

public abstract String name
Specifies the name of the relationship. Use the same name on both ends of a relationship (note that this constraint applies to unidirectional relationships as well).

groupName

public abstract String groupName
Specifies the group name of the relationshop.

Default:
"UNSPECIFIED"

jointTable

public abstract String jointTable
Deprecated. Use Relation.joinTable() instead.

Deprecated, use joinTable instead.Only needed in a Many-Many relationship. Must be the name of an existing table that will be used to hold the joint table containing the relationships. If you are using a compound primary key, specify a set of corresponding foreign keys separated by a comma.

Default:
"UNSPECIFIED"

joinTable

public abstract String joinTable
Only needed in a Many-Many relationship. Must be the name of an existing table that will be used to hold the joint table containing the relationships. If you are using a compound primary key, specify a set of corresponding foreign keys separated by a comma.

Default:
"UNSPECIFIED"

fkColumn

public abstract String fkColumn
Needed only in a relationship having at least one One side. The non-One side EJB must declare the column that it will use to store the primary key of its counterpart.

Default:
"UNSPECIFIED"

roleName

public abstract String roleName
The name of this role (such as "ParentHasChildren"). If no role name is given, EJBGen will generate one for you. You must specify a role-name in order to inherit relations.

Default:
"UNSPECIFIED"

foreignKeyTable

public abstract String foreignKeyTable
The name of a DBMS table that contains a foreign-key.

Default:
"UNSPECIFIED"

primaryKeyTable

public abstract String primaryKeyTable
The name of a DBMS table that contains a primary-key.

Default:
"UNSPECIFIED"

cmrField

public abstract String cmrField
Specifies the CMR field where this relationship will be kept. This field is optional. If it not present, the relationship is unidirectional. If it is present, the attribute fk-column must be specified as well.

Default:
"UNSPECIFIED"

dbCascadeDelete

public abstract Constants.Bool dbCascadeDelete
(True|False) Determines whether a cascade delete will use the built-in cascade delete facilities of the underlying DBMS.

Default:
weblogic.ejbgen.Constants.Bool.UNSPECIFIED

cascadeDelete

public abstract Constants.Bool cascadeDelete
(True|False)

Default:
weblogic.ejbgen.Constants.Bool.UNSPECIFIED

targetEjb

public abstract String targetEjb
Specifies the EJB name of the target of this relationship, which is used to generate the role name. If not supplied, a unique string will be generated.

Default:
"UNSPECIFIED"

id

public abstract String id
The identity of this tag (used for tag inheritance only).

Default:
"UNSPECIFIED"

Copyright 1996, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02