OccurrenceConcrete.java

43 lines | 1.083 kB Blame History Raw Download
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufrgs.inf.prosoft.aplcache.metadata;

/**
 *
 * @author romulo
 */
public class OccurrenceConcrete extends Occurrence {

    private final Object[] parameters;
    private final Object returnValue;
    private String parametersSerialised;

    public OccurrenceConcrete(Object[] arguments, Object returnedValue, long startTime, long endTime, String userId) {
        super(startTime, endTime, userId);
        this.parameters = arguments;
        this.returnValue = returnedValue;
    }

    @Override
    public Object[] getParameters() {
        return this.parameters;
    }

    @Override
    public Object getReturnValue() {
        return this.returnValue;
    }

    @Override
    public String getParametersSerialised() {
        if (this.parametersSerialised == null) {
            this.parametersSerialised = super.getParametersSerialised();
        }
        return this.parametersSerialised;
    }

}