@Override public ObjectType call() throws Exception { return session.getTypeDefinition(typeId); } }
@Override public ObjectType call() throws Exception { return session.getTypeDefinition(typeId); } }
public void removeAspect(String... id) { if (id == null || id.length == 0) { throw new IllegalArgumentException("Id must be set!"); } ObjectType[] types = new ObjectType[id.length]; for (int i = 0; i < id.length; i++) { types[i] = session.getTypeDefinition(id[i]); } removeAspect(types); }
public void removeAspect(String... id) { if (id == null || id.length == 0) { throw new IllegalArgumentException("Id must be set!"); } ObjectType[] types = new ObjectType[id.length]; for (int i = 0; i < id.length; i++) { types[i] = session.getTypeDefinition(id[i]); } removeAspect(types); }
@Override public void setType(int parameterIndex, String typeId) { setType(parameterIndex, session.getTypeDefinition(typeId)); }
public void addAspect(String... id) { if (id == null || id.length == 0) { throw new IllegalArgumentException("Id must be set!"); } ObjectType[] types = new ObjectType[id.length]; for (int i = 0; i < id.length; i++) { types[i] = session.getTypeDefinition(id[i]); } addAspect(types); }
public void addAspect(String... id) { if (id == null || id.length == 0) { throw new IllegalArgumentException("Id must be set!"); } ObjectType[] types = new ObjectType[id.length]; for (int i = 0; i < id.length; i++) { types[i] = session.getTypeDefinition(id[i]); } addAspect(types); }
public void addAspect(String[] id, Map<String, ?> properties) { if (id == null || id.length == 0) { throw new IllegalArgumentException("Id must be set!"); } ObjectType[] types = new ObjectType[id.length]; for (int i = 0; i < id.length; i++) { types[i] = session.getTypeDefinition(id[i]); } addAspect(types, properties); }
@Override public void setProperty(int parameterIndex, String typeId, String propertyId) { ObjectType type = session.getTypeDefinition(typeId); PropertyDefinition<?> propertyDefinition = type.getPropertyDefinitions().get(propertyId); if (propertyDefinition == null) { throw new IllegalArgumentException("Property does not exist!"); } setProperty(parameterIndex, propertyDefinition); }
@Override public void setProperty(int parameterIndex, String typeId, String propertyId) { ObjectType type = session.getTypeDefinition(typeId); PropertyDefinition<?> propertyDefinition = type.getPropertyDefinitions().get(propertyId); if (propertyDefinition == null) { throw new IllegalArgumentException("Property does not exist!"); } setProperty(parameterIndex, propertyDefinition); }
@Override public List<ObjectType> getAllowedTargetTypes() { if (allowedTargetTypes == null) { List<String> ids = getAllowedTargetTypeIds(); List<ObjectType> types = new ArrayList<ObjectType>(ids == null ? 0 : ids.size()); if (ids != null) { for (String id : ids) { types.add(helper.getSession().getTypeDefinition(id)); } } allowedTargetTypes = types; } return allowedTargetTypes; }
@Override public List<ObjectType> getAllowedTargetTypes() { if (allowedTargetTypes == null) { List<String> ids = getAllowedTargetTypeIds(); List<ObjectType> types = new ArrayList<ObjectType>(ids == null ? 0 : ids.size()); if (ids != null) { for (String id : ids) { types.add(helper.getSession().getTypeDefinition(id)); } } allowedTargetTypes = types; } return allowedTargetTypes; }
public ObjectType getTypeDefinition(String typeId) { ObjectType returnTypeDef = null; Session session = this.getSession(this.connectionParameters); if (session != null) { Validate.notEmpty(typeId, "typeId is empty"); returnTypeDef = session.getTypeDefinition(typeId); } return returnTypeDef; // End getTypeDefinition }
public ObjectType getParentType() { if (parentType != null) { return parentType; } if (objectType.getParentTypeId() == null || objectType.getParentTypeId().length() == 0) { return null; } parentType = session.getTypeDefinition(objectType.getParentTypeId()); return parentType; }
public ObjectType getParentType() { if (parentType != null) { return parentType; } if (objectType.getParentTypeId() == null || objectType.getParentTypeId().length() == 0) { return null; } parentType = session.getTypeDefinition(objectType.getParentTypeId()); return parentType; }
private PropertyDefinition<?> getMappedPropertyDefinition(String typeId, String propertyId, Session session) throws MapperException { String typeIdMod = typeId; while (null != typeIdMod) { TypeDefinition td = session.getTypeDefinition(typeIdMod); PropertyDefinition<?> propDef = td.getPropertyDefinitions().get(propertyId); if (null != propDef) { return propDef; } typeIdMod = td.getParentTypeId(); } throw new MapperException("Mapping error: unknown property "+ propertyId + " in type definition " + typeId); }
public ObjectType getBaseType() { if (isBaseType()) { return null; } if (baseType != null) { return baseType; } if (objectType.getBaseTypeId() == null) { return null; } baseType = session.getTypeDefinition(objectType.getBaseTypeId().value()); return baseType; }
public ObjectType getBaseType() { if (isBaseType()) { return null; } if (baseType != null) { return baseType; } if (objectType.getBaseTypeId() == null) { return null; } baseType = session.getTypeDefinition(objectType.getBaseTypeId().value()); return baseType; }
@Override public ObjectType getTypeFromObjectData(ObjectData objectData) { if (objectData == null || objectData.getProperties() == null || objectData.getProperties().getProperties() == null) { return null; } PropertyData<?> typeProperty = objectData.getProperties().getProperties().get(PropertyIds.OBJECT_TYPE_ID); if (!(typeProperty instanceof PropertyId)) { return null; } return this.session.getTypeDefinition((String) typeProperty.getFirstValue()); }
@Override public ObjectType getTypeFromObjectData(ObjectData objectData) { if (objectData == null || objectData.getProperties() == null || objectData.getProperties().getProperties() == null) { return null; } PropertyData<?> typeProperty = objectData.getProperties().getProperties().get(PropertyIds.OBJECT_TYPE_ID); if (!(typeProperty instanceof PropertyId)) { return null; } return this.session.getTypeDefinition((String) typeProperty.getFirstValue()); }