int operation,
Object value) {
int info = getOperationInfo(operation);
if ((info & OPINFO_ILLEGAL) > 0) {
throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
"core.constraint.illegalop", "" + operation)); // NOI18N
} else if ((info & OPINFO_FIELD_REQUIRED) > 0 && name == null) {
throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
"core.constraint.fieldrequired", "" + operation)); // NOI18N
} else if ((info & OPINFO_FIELD_DISALLOWED) > 0 && name != null) {
throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
"core.constraint.fielddisallowed", "" + operation)); // NOI18N
} else if ((info & OPINFO_VAL_REQUIRED) > 0 && value == null) {
throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
"core.constraint.valrequired", "" + operation)); // NOI18N
} else if ((info & OPINFO_VAL_DISALLOWED) > 0 && value != null) {
throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
"core.constraint.valdisallowed", "" + operation)); // NOI18N
}
if ((info & OPINFO_VAL_IS_PCOUNT) > 0) {
if (name != null) {
constraint.addField(name, null);