public Object getIdOf(Object instance) {
        Validate.argumentIsNotNull(instance);

        if (!isInstance(instance)) {
            throw new JaversException(JaversExceptionCode.NOT_INSTANCE_OF,
                    getName(),
                    getBaseJavaClass().getName(),
                    instance.getClass().getName());
        }

        Object cdoId = getIdProperty().get(instance);
        if (cdoId == null) {
            throw new JaversException(JaversExceptionCode.ENTITY_INSTANCE_WITH_NULL_ID, getName(), getIdProperty().getName());
        }
        return cdoId;
    }
public Object getIdOf ( Object instance ) { Validate . argumentIsNotNull ( instance ) ; if ( ! isInstance ( instance ) ) { throw new JaversException ( JaversExceptionCode . NOT_INSTANCE_OF , getName ( ) , getBaseJavaClass ( ) . getName ( ) , instance . getClass ( ) . getName ( ) ) ; } Object cdoId = getIdProperty ( ) . get ( instance ) ; if ( cdoId == null ) { throw new JaversException ( JaversExceptionCode . ENTITY_INSTANCE_WITH_NULL_ID , getName ( ) , getIdProperty ( ) . getName ( ) ) ; } return cdoId ; }
@param instance instance of {@link #getBaseJavaClass()}
@return returns ID of given instance (value of idProperty)