1 22 package org.jboss.resource.metadata; 23 24 import java.io.Serializable ; 25 26 32 public class TransactionSupportMetaData implements Serializable 33 { 34 static final long serialVersionUID = 691622093079125748L; 35 36 37 public static final int NoTransaction = 0; 38 39 40 public static final int LocalTransaction = 1; 41 42 43 public static final int XATransaction = 2; 44 45 46 private int transactionSupport; 47 48 53 public int getTransactionSupport() 54 { 55 return transactionSupport; 56 } 57 58 63 public void setTransactionSupport(int transactionSupport) 64 { 65 this.transactionSupport = transactionSupport; 66 } 67 68 public String toString() 69 { 70 StringBuffer buffer = new StringBuffer (); 71 buffer.append("TransactionSupportMetaData").append('@'); 72 buffer.append(Integer.toHexString(System.identityHashCode(this))); 73 if (transactionSupport == NoTransaction) 74 buffer.append("[transactionSupport=NoTransaction]"); 75 else if (transactionSupport == LocalTransaction) 76 buffer.append("[transactionSupport=LocalTransaction]"); 77 else if (transactionSupport == XATransaction) 78 buffer.append("[transactionSupport=XATransaction]"); 79 else 80 buffer.append("[transactionSupport=Unknown/Error]"); 81 return buffer.toString(); 82 } 83 } 84 | Popular Tags |