public Object key() {
        if (regenerateKey || key == null) {
            if (type.getSingleKeyAttribute() != null) {
                key = getKey(type.getSingleKeyAttribute()); // typical case one key attribute
            } else if (type.getKeyAttributes().size() > 1) {
                LinkedHashMap<Attribute<E, ?>, Object> keys =
                    new LinkedHashMap<>(type.getKeyAttributes().size());
                for (Attribute<E, ?> attribute : type.getKeyAttributes()) {
                    keys.put(attribute, getKey(attribute));
                }
                key = new CompositeKey<>(keys);
            } else {
                key = this;
            }
        }
        return key;
    }
public Object key ( ) { if ( regenerateKey || key == null ) { if ( type . getSingleKeyAttribute ( ) != null ) { key = getKey ( type . getSingleKeyAttribute ( ) ) ; } else if ( type . getKeyAttributes ( ) . size ( ) > 1 ) { LinkedHashMap < Attribute < E , ? > , Object > keys = new LinkedHashMap < > ( type . getKeyAttributes ( ) . size ( ) ) ; for ( Attribute < E , ? > attribute : type . getKeyAttributes ( ) ) { keys . put ( attribute , getKey ( attribute ) ) ; } key = new CompositeKey < > ( keys ) ; } else { key = this ; } } return key ; }
@return the key value for this proxy instance which is used to uniquely identify it.