OperationModel.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.web.lib.audit.log.model;

  21. import org.openspcoop2.web.lib.audit.log.Operation;

  22. import org.openspcoop2.generic_project.beans.AbstractModel;
  23. import org.openspcoop2.generic_project.beans.IField;
  24. import org.openspcoop2.generic_project.beans.Field;
  25. import org.openspcoop2.generic_project.beans.ComplexField;


  26. /**    
  27.  * Model Operation
  28.  *
  29.  * @author Poli Andrea (poli@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */
  33. public class OperationModel extends AbstractModel<Operation> {

  34.     public OperationModel(){
  35.    
  36.         super();
  37.    
  38.         this.OBJECT_DETAILS = new Field("object_details",java.lang.String.class,"operation",Operation.class);
  39.         this.BINARY = new org.openspcoop2.web.lib.audit.log.model.BinaryModel(new Field("binary",org.openspcoop2.web.lib.audit.log.Binary.class,"operation",Operation.class));
  40.         this.TIPOLOGIA = new Field("tipologia",java.lang.String.class,"operation",Operation.class);
  41.         this.TIPO_OGGETTO = new Field("tipo-oggetto",java.lang.String.class,"operation",Operation.class);
  42.         this.OBJECT_ID = new Field("object-id",java.lang.String.class,"operation",Operation.class);
  43.         this.OBJECT_OLD_ID = new Field("object-old-id",java.lang.String.class,"operation",Operation.class);
  44.         this.UTENTE = new Field("utente",java.lang.String.class,"operation",Operation.class);
  45.         this.STATO = new Field("stato",java.lang.String.class,"operation",Operation.class);
  46.         this.OBJECT_CLASS = new Field("object_class",java.lang.String.class,"operation",Operation.class);
  47.         this.ERROR = new Field("error",java.lang.String.class,"operation",Operation.class);
  48.         this.TIME_REQUEST = new Field("time-request",java.util.Date.class,"operation",Operation.class);
  49.         this.TIME_EXECUTE = new Field("time-execute",java.util.Date.class,"operation",Operation.class);
  50.         this.INTERFACE_MSG = new Field("interface-msg",java.lang.String.class,"operation",Operation.class);
  51.    
  52.     }
  53.    
  54.     public OperationModel(IField father){
  55.    
  56.         super(father);
  57.    
  58.         this.OBJECT_DETAILS = new ComplexField(father,"object_details",java.lang.String.class,"operation",Operation.class);
  59.         this.BINARY = new org.openspcoop2.web.lib.audit.log.model.BinaryModel(new ComplexField(father,"binary",org.openspcoop2.web.lib.audit.log.Binary.class,"operation",Operation.class));
  60.         this.TIPOLOGIA = new ComplexField(father,"tipologia",java.lang.String.class,"operation",Operation.class);
  61.         this.TIPO_OGGETTO = new ComplexField(father,"tipo-oggetto",java.lang.String.class,"operation",Operation.class);
  62.         this.OBJECT_ID = new ComplexField(father,"object-id",java.lang.String.class,"operation",Operation.class);
  63.         this.OBJECT_OLD_ID = new ComplexField(father,"object-old-id",java.lang.String.class,"operation",Operation.class);
  64.         this.UTENTE = new ComplexField(father,"utente",java.lang.String.class,"operation",Operation.class);
  65.         this.STATO = new ComplexField(father,"stato",java.lang.String.class,"operation",Operation.class);
  66.         this.OBJECT_CLASS = new ComplexField(father,"object_class",java.lang.String.class,"operation",Operation.class);
  67.         this.ERROR = new ComplexField(father,"error",java.lang.String.class,"operation",Operation.class);
  68.         this.TIME_REQUEST = new ComplexField(father,"time-request",java.util.Date.class,"operation",Operation.class);
  69.         this.TIME_EXECUTE = new ComplexField(father,"time-execute",java.util.Date.class,"operation",Operation.class);
  70.         this.INTERFACE_MSG = new ComplexField(father,"interface-msg",java.lang.String.class,"operation",Operation.class);
  71.    
  72.     }
  73.    
  74.    

  75.     public IField OBJECT_DETAILS = null;
  76.      
  77.     public org.openspcoop2.web.lib.audit.log.model.BinaryModel BINARY = null;
  78.      
  79.     public IField TIPOLOGIA = null;
  80.      
  81.     public IField TIPO_OGGETTO = null;
  82.      
  83.     public IField OBJECT_ID = null;
  84.      
  85.     public IField OBJECT_OLD_ID = null;
  86.      
  87.     public IField UTENTE = null;
  88.      
  89.     public IField STATO = null;
  90.      
  91.     public IField OBJECT_CLASS = null;
  92.      
  93.     public IField ERROR = null;
  94.      
  95.     public IField TIME_REQUEST = null;
  96.      
  97.     public IField TIME_EXECUTE = null;
  98.      
  99.     public IField INTERFACE_MSG = null;
  100.      

  101.     @Override
  102.     public Class<Operation> getModeledClass(){
  103.         return Operation.class;
  104.     }
  105.    
  106.     @Override
  107.     public String toString(){
  108.         if(this.getModeledClass()!=null){
  109.             return this.getModeledClass().getName();
  110.         }else{
  111.             return "N.D.";
  112.         }
  113.     }

  114. }