use of org.structr.core.entity.SchemaProperty in project structr by structr.
the class StructrLongProperty method createDatabaseSchema.
@Override
SchemaProperty createDatabaseSchema(final App app, final AbstractSchemaNode schemaNode) throws FrameworkException {
final SchemaProperty property = super.createDatabaseSchema(app, schemaNode);
final PropertyMap properties = new PropertyMap();
properties.put(SchemaProperty.propertyType, Type.Long.name());
if (minimum != null && maximum != null) {
final StringBuilder range = new StringBuilder();
if (exclusiveMinimum) {
range.append("]");
} else {
range.append("[");
}
range.append(minimum);
range.append(",");
range.append(maximum);
if (exclusiveMaximum) {
range.append("[");
} else {
range.append("]");
}
properties.put(SchemaProperty.format, range.toString());
}
property.setProperties(SecurityContext.getSuperUserInstance(), properties);
return property;
}
use of org.structr.core.entity.SchemaProperty in project structr by structr.
the class IdNotionReferenceProperty method createDatabaseSchema.
@Override
SchemaProperty createDatabaseSchema(final App app, final AbstractSchemaNode schemaNode) throws FrameworkException {
final SchemaProperty property = super.createDatabaseSchema(app, schemaNode);
final PropertyMap properties = new PropertyMap();
properties.put(SchemaProperty.format, referenceName + ", " + StringUtils.join(properties, ", "));
properties.put(SchemaProperty.propertyType, SchemaHelper.Type.IdNotion.name());
property.setProperties(SecurityContext.getSuperUserInstance(), properties);
return property;
}
use of org.structr.core.entity.SchemaProperty in project structr by structr.
the class NotionReferenceProperty method createDatabaseSchema.
// ----- package methods -----
@Override
SchemaProperty createDatabaseSchema(final App app, final AbstractSchemaNode schemaNode) throws FrameworkException {
final SchemaProperty property = super.createDatabaseSchema(app, schemaNode);
final PropertyMap createProperties = new PropertyMap();
createProperties.put(SchemaProperty.format, referenceName + ", " + StringUtils.join(properties, ", "));
createProperties.put(SchemaProperty.propertyType, SchemaHelper.Type.Notion.name());
property.setProperties(SecurityContext.getSuperUserInstance(), createProperties);
return property;
}
use of org.structr.core.entity.SchemaProperty in project structr by structr.
the class StructrCountProperty method createDatabaseSchema.
@Override
SchemaProperty createDatabaseSchema(final App app, final AbstractSchemaNode schemaNode) throws FrameworkException {
final SchemaProperty property = super.createDatabaseSchema(app, schemaNode);
final PropertyMap properties = new PropertyMap();
properties.put(SchemaProperty.propertyType, SchemaHelper.Type.Count.name());
properties.put(SchemaProperty.format, getFormat());
property.setProperties(SecurityContext.getSuperUserInstance(), properties);
return property;
}
Aggregations