@Override public boolean isMandatory() { return delegate.isMandatory(); }
private void modifyCaseInsensitiveNameField(final OClass type) { log.info("Modifying case-insensitive name field on component"); OProperty ciNameProperty = type.getProperty(P_CI_NAME); if (!ciNameProperty.isMandatory()) { ciNameProperty.setMandatory(true); } if (!ciNameProperty.isNotNull()) { ciNameProperty.setNotNull(true); } }
@Override public void afterRegistration(final ODatabaseObject db, final SchemeDescriptor descriptor, final Field field, final Mandatory annotation) { final String name = field.getName(); final boolean mandatory = annotation.value(); final OProperty property = db.getMetadata().getSchema() .getClass(descriptor.schemeClass).getProperty(name); if (property.isMandatory() != mandatory) { property.setMandatory(mandatory); logger.debug("Set {}.{} property mandatory={}", descriptor.schemeClass, name, mandatory); } } }
@Override protected DisplayMode getEffectiveMode(DisplayMode mode, OProperty property) { if(mode.canModify() && property!= null && ((property.isReadonly() || (Boolean)CustomAttribute.UI_READONLY.getValue(property)) && !(property.isMandatory() && !getEntityObject().containsField(property.getName()))) || (!Strings.isEmpty(featureSpecification) && !OSecurityHelper.isAllowed(OSecurityHelper.FEATURE_RESOURCE, featureSpecification, OrientPermission.UPDATE))) { return DisplayMode.VIEW; } return mode; }
public static void realizeMandatory(ODocument doc) { OClass oClass = doc.getSchemaClass(); if(oClass!=null) { for(OProperty property : oClass.properties()) { if(property.isMandatory() && Strings.isEmpty(property.getDefaultValue()) && !doc.containsField(property.getName())) { doc.field(property.getName(), (Object) null); } } } }
if (cls != null) for (OProperty p : cls.properties()) { if (p.isMandatory() || p.isNotNull() || !p.getOwnerClass().getInvolvedIndexes(p.getName()).isEmpty()) return false;
if (cls != null) for (OProperty p : cls.properties()) { if (p.isMandatory() || p.isNotNull()) return false;
row.field("TYPE", p.getType()); row.field("LINKED-TYPE/CLASS", p.getLinkedClass() != null ? p.getLinkedClass() : p.getLinkedType()); row.field("MANDATORY", p.isMandatory()); row.field("READONLY", p.isReadonly()); row.field("NOT-NULL", p.isNotNull());
writer.writeAttribute(0, false, "name", p.getName()); writer.writeAttribute(0, false, "type", p.getType().toString()); if (p.isMandatory()) writer.writeAttribute(0, false, "mandatory", p.isMandatory()); if (p.isReadonly()) writer.writeAttribute(0, false, "readonly", p.isReadonly());
message("\nMandatory............: " + prop.isMandatory()); message("\nNot null.............: " + prop.isNotNull()); message("\nRead only............: " + prop.isReadonly());
if (p.isNotNull()) { validatable.error(newValidationError("required")); } else if (p.isMandatory() && Strings.isEmpty(p.getDefaultValue())) { ODocument doc = getDocument();
if (p.isNotNull()) { validatable.error(newValidationError("required")); } else if (p.isMandatory() && Strings.isEmpty(p.getDefaultValue())) { ODocument doc = getDocument();
if (prop.isMandatory() != prop2.isMandatory()) { listener.onMessage( "\n- ERR: Class definition for " + clazz.getName() + " as not same mandatory flag for property " + prop.getName()
notNull = property.isNotNull(); collate = property.getCollate(); mandatory = property.isMandatory(); min = property.getMin(); max = property.getMax();