| | 116 | |
|---|
| | 117 | /** |
|---|
| | 118 | * Is this FieldDescriptor an attribute? |
|---|
| | 119 | * |
|---|
| | 120 | * @return true if this FieldDescriptor describes an attribute |
|---|
| | 121 | */ |
|---|
| | 122 | public boolean isAttribute() { |
|---|
| | 123 | return relationType() == NOT_RELATION; |
|---|
| | 124 | } |
|---|
| | 125 | |
|---|
| | 126 | /** |
|---|
| | 127 | * Is this FieldDescriptor a reference? |
|---|
| | 128 | * |
|---|
| | 129 | * @return true if this FieldDescriptor describes an attribute |
|---|
| | 130 | */ |
|---|
| | 131 | public boolean isReference() { |
|---|
| | 132 | return (relationType() == ONE_ONE_RELATION) || (relationType() == N_ONE_RELATION); |
|---|
| | 133 | } |
|---|
| | 134 | |
|---|
| | 135 | /** |
|---|
| | 136 | * Is this FieldDescriptor a collection? |
|---|
| | 137 | * |
|---|
| | 138 | * @return true if this FieldDescriptor describes an attribute |
|---|
| | 139 | */ |
|---|
| | 140 | public boolean isCollection() { |
|---|
| | 141 | return (relationType() == ONE_N_RELATION) || (relationType() == M_N_RELATION); |
|---|
| | 142 | } |
|---|
| | 143 | |
|---|
| | 144 | |
|---|