1 package org.apache.ojb.otm.connector; 2 3 17 18 import org.apache.ojb.broker.PBKey; 19 import org.apache.ojb.broker.PersistenceBrokerFactory; 20 21 import javax.resource.spi.ConnectionRequestInfo ; 22 23 27 28 public class OTMConnectionRequestInfo 29 implements ConnectionRequestInfo 30 { 31 private PBKey m_pbKey; 32 33 public OTMConnectionRequestInfo(PBKey pbkey) 34 { 35 Util.log("In OTMConnectionRequestInfo"); 36 m_pbKey = pbkey; 37 } 38 39 public PBKey getPbKey() 40 { 41 if (m_pbKey == null) 42 return PersistenceBrokerFactory.getDefaultKey(); 43 else 44 return m_pbKey; 45 } 46 47 public boolean equals(Object o) 48 { 49 if (this == o) return true; 50 if (!(o instanceof OTMConnectionRequestInfo)) return false; 51 52 final OTMConnectionRequestInfo otmConnectionRequestInfo = (OTMConnectionRequestInfo) o; 53 54 if (m_pbKey != null ? !m_pbKey.equals(otmConnectionRequestInfo.m_pbKey) : otmConnectionRequestInfo.m_pbKey != null) return false; 55 56 return true; 57 } 58 59 public int hashCode() 60 { 61 return (m_pbKey != null ? m_pbKey.hashCode() : 0); 62 } 63 } 64 | Popular Tags |