All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.broadleafcommerce.common.presentation.AdminPresentationOperationTypes Maven / Gradle / Ivy

There is a newer version: 3.1.15-GA
Show newest version
/*
 * #%L
 * BroadleafCommerce Common Libraries
 * %%
 * Copyright (C) 2009 - 2013 Broadleaf Commerce
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */
package org.broadleafcommerce.common.presentation;

import org.broadleafcommerce.common.presentation.client.OperationType;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation for defining how CRUD operations are performed on an advanced collection in Broadleaf Commerce.
 * This is an advanced configuration, as the default operation settings are appropriate in most cases.
 *
 * @author Jeff Fischer
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
public @interface AdminPresentationOperationTypes {

    /**
     * 

How should the system execute an addition for this item

* *

OperationType BASIC will result in the item being inserted
* OperationType ADORNEDTARGETLIST will result in a adorned target entity being added (not either of the associated entities).
* CrossSaleProductImpl is an example of an adorned target entity, since it adds additional fields around the target Product entity.
* OperationType MAP will result in the item being added to the requisite map in the containing entity.

* * @return the type of the add operation */ OperationType addType() default OperationType.BASIC; /** *

How should the system execute an update for this item

* *

OperationType BASIC will result in the item being updated based on it's primary key
* OperationType ADORNEDTARGETLIST will result in a join structure entity being updated (not either of the associated entities).
* CrossSaleProductImpl is an example of an adorned target entity, since it adds additional fields around the target Product entity.
* OperationType MAP will result in the item being updated to the requisite map in the containing entity.

* * @return the type of the update operation */ OperationType updateType() default OperationType.BASIC; /** *

How should the system execute a removal of this item.

* *

OperationType BASIC will result in the item being removed based on its primary key
* OperationType NONDESTRUCTIVEREMOVE will result in the item being removed from the containing list in the containing entity. This * is useful when you don't want the item to actually be deleted, but simply removed from the parent collection.
* OperationType ADORNEDTARGETLIST will result in a join structure being deleted (not either of the associated entities).
* CrossSaleProductImpl is an example of an adorned target entity, since it adds additional fields around the target Product entity.
* OperationType MAP will result in the item being removed from the requisite map in the containing entity.

* * @return the type of remove operation */ OperationType removeType() default OperationType.BASIC; /** *

How should the system execute a fetch

* *

OperationType BASIC will result in a search for items having one or more basic properties matches
* OperationType ADORNEDTARGETLIST will result in search for target items that match the parent association in the adorned target entity.
* CrossSaleProductImpl is an example of an adorned target entity, since it adds additional fields around the target Product entity.
* OperationType MAP will result retrieval of all map entries for the requisite map in the containing entity.

* * @return the type of the fetch operation */ OperationType fetchType() default OperationType.BASIC; /** *

OperationType values are generally ignored for inspect and should be defined as BASIC for consistency in most circumstances. * This API is meant to support future persistence modules where specialized inspect phase management may be required.

* * @return the type of the inspect operation */ OperationType inspectType() default OperationType.BASIC; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy