Package org.apache.isis.core.metamodel.facets.properties.defaults

Examples of org.apache.isis.core.metamodel.facets.properties.defaults.PropertyDefaultFacet


     * default.
     */
    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        // don't overwrite any defaults that might already picked up
        final PropertyDefaultFacet existingDefaultFacet = processMethodContext.getFacetHolder().getFacet(PropertyDefaultFacet.class);
        if (existingDefaultFacet != null && !existingDefaultFacet.isNoop()) {
            return;
        }

        // try to infer defaults from the underlying return type
        final Class<?> returnType = processMethodContext.getMethod().getReturnType();
View Full Code Here


    // defaults
    // /////////////////////////////////////////////////////////////

    @Override
    public ObjectAdapter getDefault(final ObjectAdapter ownerAdapter) {
        PropertyDefaultFacet propertyDefaultFacet = getFacet(PropertyDefaultFacet.class);
        // if no default on the association, attempt to find a default on the
        // specification (eg an int should
        // default to 0).
        if (propertyDefaultFacet == null || propertyDefaultFacet.isNoop()) {
            propertyDefaultFacet = this.getSpecification().getFacet(PropertyDefaultFacet.class);
        }
        if (propertyDefaultFacet == null) {
            return null;
        }
        return propertyDefaultFacet.getDefault(ownerAdapter);
    }
View Full Code Here

     * default.
     */
    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        // don't overwrite any defaults that might already picked up
        final PropertyDefaultFacet existingDefaultFacet = processMethodContext.getFacetHolder().getFacet(PropertyDefaultFacet.class);
        if (existingDefaultFacet != null && !existingDefaultFacet.isNoop()) {
            return;
        }

        // try to infer defaults from the underlying return type
        final Class<?> returnType = processMethodContext.getMethod().getReturnType();
View Full Code Here

    // defaults
    // /////////////////////////////////////////////////////////////

    @Override
    public ObjectAdapter getDefault(final ObjectAdapter ownerAdapter) {
        PropertyDefaultFacet propertyDefaultFacet = getFacet(PropertyDefaultFacet.class);
        // if no default on the association, attempt to find a default on the
        // specification (eg an int should
        // default to 0).
        if (propertyDefaultFacet == null || propertyDefaultFacet.isNoop()) {
            propertyDefaultFacet = this.getSpecification().getFacet(PropertyDefaultFacet.class);
        }
        if (propertyDefaultFacet == null) {
            return null;
        }
        return propertyDefaultFacet.getDefault(ownerAdapter);
    }
View Full Code Here

     * default.
     */
    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        // don't overwrite any defaults that might already picked up
        final PropertyDefaultFacet existingDefaultFacet = processMethodContext.getFacetHolder().getFacet(PropertyDefaultFacet.class);
        if (existingDefaultFacet != null && !existingDefaultFacet.isNoop()) {
            return;
        }

        // try to infer defaults from the underlying return type
        final Class<?> returnType = processMethodContext.getMethod().getReturnType();
View Full Code Here

    // defaults
    // /////////////////////////////////////////////////////////////

    @Override
    public ObjectAdapter getDefault(final ObjectAdapter ownerAdapter) {
        PropertyDefaultFacet propertyDefaultFacet = getFacet(PropertyDefaultFacet.class);
        // if no default on the association, attempt to find a default on the
        // specification (eg an int should
        // default to 0).
        if (propertyDefaultFacet == null || propertyDefaultFacet.isNoop()) {
            propertyDefaultFacet = this.getSpecification().getFacet(PropertyDefaultFacet.class);
        }
        if (propertyDefaultFacet == null) {
            return null;
        }
        return propertyDefaultFacet.getDefault(ownerAdapter);
    }
View Full Code Here

     * for the property with the same default.
     */
    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        // don't overwrite any defaults that might already picked up
        final PropertyDefaultFacet existingDefaultFacet =
            processMethodContext.getFacetHolder().getFacet(PropertyDefaultFacet.class);
        if (existingDefaultFacet != null && !existingDefaultFacet.isNoop()) {
            return;
        }

        // try to infer defaults from the underlying return type
        final Class<?> returnType = processMethodContext.getMethod().getReturnType();
View Full Code Here

    // defaults
    // /////////////////////////////////////////////////////////////

    @Override
    public ObjectAdapter getDefault(final ObjectAdapter ownerAdapter) {
        PropertyDefaultFacet propertyDefaultFacet = getFacet(PropertyDefaultFacet.class);
        // if no default on the association, attempt to find a default on the specification (eg an int should
        // default to 0).
        if (propertyDefaultFacet == null || propertyDefaultFacet.isNoop()) {
            propertyDefaultFacet = this.getSpecification().getFacet(PropertyDefaultFacet.class);
        }
        if (propertyDefaultFacet == null) {
            return null;
        }
        return propertyDefaultFacet.getDefault(ownerAdapter);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.properties.defaults.PropertyDefaultFacet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.