Compute the namer for the Java field marked by @OneToOne

@param fromAttribute     the fk column config
@param targetEntityNamer
486428
public Namer getOneToOneNamer(Attribute fromAttribute, Namer targetEntityNamer) {
        // configuration
        Namer result = getOneToOneNamerFromConf(fromAttribute.getColumnConfig(), targetEntityNamer);

        // fall back
        if (result == null) {
            result = getXToOneNamerFallBack(fromAttribute, targetEntityNamer);
        }

        return result;
    }
645655
private String getPropertyName(final String targetTypeName, final boolean outgoing, final String relationshipTypeName, final Cardinality cardinality) {

		final String sourceTypeName   = getName();
		final String relatedClassName = outgoing ? targetTypeName : sourceTypeName;

		String _sourceMultiplicity = null;
		String _targetMultiplicity = null;

		switch (cardinality) {

			case OneToOne:
				_sourceMultiplicity = "1";
				_targetMultiplicity = "1";
				break;

			case OneToMany:
				_sourceMultiplicity = "1";
				_targetMultiplicity = "*";
				break;

			case ManyToOne:
				_sourceMultiplicity = "*";
				_targetMultiplicity = "1";
				break;

			case ManyToMany:
				_sourceMultiplicity = "*";
				_targetMultiplicity = "*";
				break;
		}

		return SchemaRelationshipNode.getPropertyName(relatedClassName, root.getExistingPropertyNames(), outgoing, relationshipTypeName, sourceTypeName, targetTypeName, null, _targetMultiplicity, null, _sourceMultiplicity);
	}
1363046
private MappingTarget toMappingTarget(Entity mappingTargetEntity) {
    List<EntityMapping> entityMappings = Collections.emptyList();
    String identifier = mappingTargetEntity.getString(MappingTargetMetadata.IDENTIFIER);

    if (!dataService.hasRepository(mappingTargetEntity.getString(MappingTargetMetadata.TARGET))) {
      return null;
    }

    EntityType target =
        dataService.getEntityType(mappingTargetEntity.getString(MappingTargetMetadata.TARGET));

    if (mappingTargetEntity.getEntities(MappingTargetMetadata.ENTITY_MAPPINGS) != null) {
      List<Entity> entityMappingEntities =
          Lists.newArrayList(
              mappingTargetEntity.getEntities(MappingTargetMetadata.ENTITY_MAPPINGS));
      entityMappings = entityMappingRepository.toEntityMappings(entityMappingEntities);
    }

    return new MappingTarget(identifier, target, entityMappings);
  }
767816
public function joinTableName($sourceEntity, $targetEntity, $propertyName = null)
    {
        $names = [
            $this->classToFieldName($sourceEntity),
            $this->classToFieldName($targetEntity)
        ];

        sort($names);

        return implode('_', $names);
    }
1062533
private static String initMatchOwnerEntityNode(EntityKeyMetadata ownerEntityKeyMetadata) {
		StringBuilder queryBuilder = new StringBuilder();
		appendMatchOwnerEntityNode( queryBuilder, ownerEntityKeyMetadata );
		return queryBuilder.toString();
	}
100934
public void updateAttributes(String targetId, Map<String, String> attributes)
            throws IOException {
        startChangesIfNecessary();
        ResponseWriter writer = getWrapped();
        writer.startElement("attributes", null);
        writer.writeAttribute("id", targetId, null);
        for (Map.Entry<String, String> entry : attributes.entrySet()) {
            writer.startElement("attribute", null);
            writer.writeAttribute("name", entry.getKey(), null);
            writer.writeAttribute("value", entry.getValue(), null);
            writer.endElement("attribute");
        }
        writer.endElement("attributes");
    }
355923
@Override
	public void setFromName(String fromName, java.util.Locale locale) {
		_commerceNotificationTemplate.setFromName(fromName, locale);
	}
306340
protected function isOneToOneRelation(Model $fromModel, Model $toModel, $fkOrMorphName)
    {
        $oneToOneRelations = $this->getConfig('one_to_one_relations', []);

        $from = $fromModel->getTable();
        $to = $toModel->getTable().'.'.$fkOrMorphName;

        if (in_array("$from:$to", $oneToOneRelations)) {
            return true;
        }

        return false;
    }
1028969
public static String findAttributeName( SimpleFeatureType featureType, String field ) {
        List<AttributeDescriptor> attributeDescriptors = featureType.getAttributeDescriptors();
        for( AttributeDescriptor attributeDescriptor : attributeDescriptors ) {
            String name = attributeDescriptor.getLocalName();
            if (name.toLowerCase().equals(field.toLowerCase())) {
                return name;
            }
        }
        return null;
    }
808101
public List<String> getAttributeIdentifiers(EntityType sourceEntityType) {
    Entity entityTypeEntity =
        dataService.findOne(
            ENTITY_TYPE_META_DATA,
            new QueryImpl<>().eq(EntityTypeMetadata.ID, sourceEntityType.getId()));

    if (entityTypeEntity == null)
      throw new MolgenisDataAccessException(
          "Could not find EntityTypeEntity by the name of " + sourceEntityType.getId());

    List<String> attributeIdentifiers = new ArrayList<>();

    recursivelyCollectAttributeIdentifiers(
        entityTypeEntity.getEntities(EntityTypeMetadata.ATTRIBUTES), attributeIdentifiers);

    return attributeIdentifiers;
  }
675720
@XmlAttribute(name="name", required=true)
    public void setFieldName(final String fieldName) {
        ArgUtils.notEmpty(fieldName, "fieldName");
        this.fieldName = fieldName;
    }
37121
String getAttributeName(Method getter) {
        String attributeName;
        readLockAttrName.lock();
        try {
            attributeName = attributeNameCache.get(getter);
        } finally {
            readLockAttrName.unlock();
        }
        if ( attributeName != null )
            return attributeName;
        DynamoDBHashKey hashKeyAnnotation = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBHashKey.class);
        if ( hashKeyAnnotation != null ) {
            attributeName = hashKeyAnnotation.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        DynamoDBIndexHashKey indexHashKey = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBIndexHashKey.class);
        if ( indexHashKey != null ) {
            attributeName = indexHashKey.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        DynamoDBRangeKey rangeKey = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBRangeKey.class);
        if ( rangeKey != null ) {
            attributeName = rangeKey.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        DynamoDBIndexRangeKey indexRangeKey = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBIndexRangeKey.class);
        if ( indexRangeKey != null ) {
            attributeName = indexRangeKey.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        DynamoDBAttribute attribute = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBAttribute.class);
        if ( attribute != null ) {
            attributeName = attribute.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        DynamoDBVersionAttribute version = ReflectionUtils.getAnnotationFromGetterOrField(getter, DynamoDBVersionAttribute.class);
        if ( version != null ) {
            attributeName = version.attributeName();
            if ( attributeName != null && attributeName.length() > 0 )
                return cacheAttributeName(getter, attributeName);
        }
        // Default to the camel-cased field name of the getter method, inferred
        // according to the Java naming convention.
        attributeName = ReflectionUtils.getFieldNameByGetter(getter, true);
        return cacheAttributeName(getter, attributeName);
    }
1008949
public static Entry namedObject(String name, Dn baseDn) {
        Dn dn = Utils.concatDn(SchemaConstants.CN_ATTRIBUTE, name, baseDn);
        return namedObject(dn);
    }
940617
public function innerJoinOneTable(
        string $fromAlias,
        string $fromColumn,
        string $targetTable,
        string $targetColumn
    ): string {
        $targetAlias   = $this->createAlias($targetTable);
        $joinCondition = $this->quoteDoubleIdentifier($fromAlias, $fromColumn) . '=' .
            $this->quoteDoubleIdentifier($targetAlias, $targetColumn);

        $this->innerJoin(
            $this->quoteSingleIdentifier($fromAlias),
            $this->quoteSingleIdentifier($targetTable),
            $this->quoteSingleIdentifier($targetAlias),
            $joinCondition
        );

        return $targetAlias;
    }
821732
public void init(BaseField field, String targetFieldName, BaseField fldTarget)
    {
        super.init(field);

        m_bDisableTarget = false;
        this.targetFieldName = targetFieldName;
        m_fldTarget = fldTarget;
    }
754336
public static ForeignKeyConstraint of(String name, Attribute attribute, Attribute reference) {
		return new Builder((DatabaseRelationDefinition)attribute.getRelation(), 
							(DatabaseRelationDefinition)reference.getRelation())
									.add(attribute, reference).build(name);
	}
1161042
@SuppressWarnings({ "rawtypes", "unchecked" })
	private void setAttribute(NodeConfig nodeConfig, Object targetObject) throws UnmarshalException {
		Class targetClass = targetObject.getClass();
		List attributes = nodeConfig.getAttribute();
		if (attributes != null && attributes.size() > 0) {
			for (Iterator iterAttr = attributes.iterator(); iterAttr.hasNext();) {
				AttributeConfig attribute = (AttributeConfig) iterAttr.next();
				String methodName = Constant.SET_PREFIX + StringUtils.capitalize(attribute.getName());
				try {
					Method method = targetClass.getMethod(methodName, String.class);
					if (method != null) {
						setMethod(method, targetObject, attribute.getValue());
					}
				} catch (NoSuchMethodException e) {
					if (validation) {
						throw new UnmarshalException(e);
					}
				}
			}
		}
	}