public void validateMapKey(List<IMessage> messages, IReporter reporter) { if (this.getMapKey() != null) { // TODO validate that the map key refers to an existing attribute return; } if (this.keyType == Type.BASIC_TYPE) { this.mapKeyColumn.validate(messages, reporter); this.mapKeyConverter.validate(messages, reporter); } else if (this.keyType == Type.ENTITY_TYPE) { for (OrmSpecifiedJoinColumn joinColumn : this.getMapKeyJoinColumns()) { joinColumn.validate(messages, reporter); } } else if (this.keyType == Type.EMBEDDABLE_TYPE) { this.mapKeyAttributeOverrideContainer.validate(messages, reporter); // validate map key association overrides } }
@Override public Iterable<String> getCompletionProposals(int pos) { Iterable<String> result = super.getCompletionProposals(pos); if (result != null) { return result; } result = this.orderable.getCompletionProposals(pos); if (result != null) { return result; } if (this.mapKeyNameTouches(pos)) { return this.getCandidateMapKeyNames(); } if (this.mapKeyClassTouches(pos)) { return this.getCandidateMapKeyClassNames(); } result = this.mapKeyColumn.getCompletionProposals(pos); if (result != null) { return result; } result = this.mapKeyConverter.getCompletionProposals(pos); if (result != null) { return result; } result = this.mapKeyAttributeOverrideContainer.getCompletionProposals(pos); if (result != null) { return result; } for (OrmSpecifiedJoinColumn joinColumn : this.getMapKeyJoinColumns()) { result = joinColumn.getCompletionProposals(pos); if (result != null) { return result; } } return null; }
@Override protected XmlJoinColumn getResourceElement(OrmSpecifiedJoinColumn contextElement) { return contextElement.getXmlColumn(); }