[jboss-dev-forums] [Design of Persistence on JBoss] - cannot instatiate abstract class

jflf83 do-not-reply at jboss.com
Thu Jun 21 13:13:05 EDT 2007


Hello, I have problems when a I try to list the elements of an abstract class. the exceptions is:
Caused by: javax.ejb.EJBTransactionRolledbackException: javax.persistence.Persis

import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

@Entity
public abstract class Y extends X{

	public Saida() 
	{
		super();
	}

	public Saida(double consumoFinanceiro, Setor setor) 
	{
		super(consumoFinanceiro, setor);
	}

	

}

package br.gov.gemog.siest.core.entity;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

@Entity
public class Z extends X 
{
	public static final String ENTRADA = "Entrada";	

	private String numeroNotaFiscal;
	
	private Fornecedor fornecedor;
	
	private double valorEntrada;
	
	private String codigoFornecedor;
	

	public double getValorEntrada() { 
		return valorEntrada;
	}

	public void setValorEntrada(double valorEntrada) {
		this.valorEntrada = valorEntrada;
	}

	@Override
	public String getNumeroNotaFiscal()
	{
		return numeroNotaFiscal;
	}
	
	public void setNumeroNotaFiscal(String numeroNotaFiscal) 
	{
		this.numeroNotaFiscal = numeroNotaFiscal;
	}

	public void setFornecedor(Fornecedor fornecedor)
	{
		this.fornecedor = fornecedor;
	}

	@ManyToOne
	public Fornecedor getFornecedor()
	{
		return fornecedor;
	}

	public String getCodigoFornecedor() {
		return codigoFornecedor; 
	}

	public void setCodigoFornecedor(String codigoFornecedor) {
		this.codigoFornecedor = codigoFornecedor;
	}
	
	@Override
	@Transient
	public String getTipoMovimentacao() 
	{
		return ENTRADA;
	}
	
	@Override
	@Transient
	public String getValorMovimentacao()
	{
		return SEM_ELEMENTO;
	}

	@Override
	@Transient
	public Object getSetor()
	{
		return " - ";
	}
	
	@Override
	@Transient
	public double getConsumoFinanceiro() {
		// TODO Auto-generated method stub
		return 0;
	}
}

Someone can help me?
Thank you




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056601#4056601

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056601



More information about the jboss-dev-forums mailing list