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

br.com.jarch.faces.controller.TransferListToData Maven / Gradle / Ivy

package br.com.jarch.faces.controller;

import br.com.jarch.core.annotation.JArchDynamicShowDataController;
import br.com.jarch.faces.util.JsfUtils;
import br.com.jarch.core.model.IIdentity;
import br.com.jarch.core.model.type.ActionCrudType;

public class TransferListToData {

    private final String actionCrud;
    private final String idEntity;
    private final String idDynamic;
    private final String labelMenuDynamic;
    private final String annotationDynamic;
    private final String entity;
    private final String idTask;

    public TransferListToData(Class clazzEntity) {
        actionCrud = "session.listToData.actionCrud." + clazzEntity.getSimpleName();
        idEntity = "session.listToData.idEntity." + clazzEntity.getSimpleName();
        idDynamic = "session.listToData.idDynamic." + clazzEntity.getSimpleName();
        labelMenuDynamic = "session.listToData.labelMenuDynamic." + clazzEntity.getSimpleName();
        annotationDynamic = "session.listToData.annotationDynamic." + clazzEntity.getSimpleName();
        entity = "session.listToData.entity." + clazzEntity.getSimpleName();
        idTask = "session.listToData.idTask." + clazzEntity.getSimpleName();
    }

    public ActionCrudType getActionCrud() {
        return JsfUtils.getAttributeSession(actionCrud);
    }

    public void setActionCrud(ActionCrudType actionCrud) {
        JsfUtils.setAttributeSession(this.actionCrud, actionCrud);
    }

    public Long getIdEntity() {
        return JsfUtils.getAttributeSession(idEntity);
    }

    public void setIdEntity(Long id) {
        JsfUtils.setAttributeSession(idEntity, id);
    }

    public String getIdDynamic() {
        return JsfUtils.getAttributeSession(idDynamic);
    }

    public void setIdDynamic(String idDynamic) {
        JsfUtils.setAttributeSession(this.idDynamic, idDynamic);
    }

    public String getLabelMenuDynamic() {
        return JsfUtils.getAttributeSession(labelMenuDynamic);
    }

    public void setLabelMenuDynamic(String labelMenuDynamic) {
        JsfUtils.setAttributeSession(this.labelMenuDynamic, labelMenuDynamic);
    }

    public JArchDynamicShowDataController getAnnotationDynamic() {
        return JsfUtils.getAttributeSession(annotationDynamic);
    }

    public void setAnnotationDynamic(JArchDynamicShowDataController annotationDynamic) {
        JsfUtils.setAttributeSession(this.annotationDynamic, annotationDynamic);
    }

    public E getEntity() {
        return JsfUtils.getAttributeSession(entity);
    }

    public void setEntity(E entity) {
        JsfUtils.setAttributeSession(this.entity, entity);
    }

    public String getIdTask() {
        return JsfUtils.getAttributeSession(idTask);
    }

    public void setIdTask(String idTask) {
        JsfUtils.setAttributeSession(this.idTask, idTask);
    }

    public void clear() {
        JsfUtils.removeAttributeSession(actionCrud);
        JsfUtils.removeAttributeSession(idEntity);
        JsfUtils.removeAttributeSession(idDynamic);
        JsfUtils.removeAttributeSession(annotationDynamic);
        JsfUtils.removeAttributeSession(entity);
        JsfUtils.removeAttributeSession(idTask);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy