1 package com.bonevich.erj.model;
2
3 /*** A class that represents ...
4 *
5 * @see Attribute
6 * @author Jeffrey D. Bonevich <bonevich@telocity.com>
7 */
8 public final class AttributeConstraint
9 {
10 //////////////////////////////////////////////////////////
11 // Constants
12 private static final int NULL_TYPE = 0;
13 private static final int NOTNULL_TYPE = 1;
14
15 public static final String NULL_STR = "NULL";
16 public static final String NOTNULL_STR = "NOTNULL";
17
18 public static final AttributeConstraint NULL = new AttributeConstraint(NULL_TYPE);
19 public static final AttributeConstraint NOTNULL = new AttributeConstraint(NOTNULL_TYPE);
20 public static final AttributeConstraint DEFAULT = NULL;
21
22 //////////////////////////////////////////////////////////
23 // Attributes
24 private int _type;
25
26 //////////////////////////////////////////////////////////
27 // Constructors
28 private AttributeConstraint(int type)
29 {
30 _type = type;
31 }
32
33 //////////////////////////////////////////////////////////
34 // Operations
35 public String toString()
36 {
37 if (_type == NOTNULL_TYPE) return NOTNULL_STR;
38 return NULL_STR;
39 }
40
41 } /* end class AttributeConstraint */
This page was automatically generated by Maven