001// -------------------------------------------------------------------------------- 002// Copyright 2002-2024 Echo Three, LLC 003// 004// Licensed under the Apache License, Version 2.0 (the "License"); 005// you may not use this file except in compliance with the License. 006// You may obtain a copy of the License at 007// 008// http://www.apache.org/licenses/LICENSE-2.0 009// 010// Unless required by applicable law or agreed to in writing, software 011// distributed under the License is distributed on an "AS IS" BASIS, 012// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013// See the License for the specific language governing permissions and 014// limitations under the License. 015// -------------------------------------------------------------------------------- 016// Generated File -- DO NOT EDIT BY HAND 017// -------------------------------------------------------------------------------- 018 019/** 020 * PaymentProcessorTransactionDetail.java 021 */ 022 023package com.echothree.model.data.payment.server.entity; 024 025import com.echothree.model.data.payment.common.pk.PaymentProcessorTransactionDetailPK; 026 027import com.echothree.model.data.payment.common.pk.PaymentProcessorTransactionPK; 028import com.echothree.model.data.payment.common.pk.PaymentProcessorPK; 029import com.echothree.model.data.payment.common.pk.PaymentProcessorActionTypePK; 030import com.echothree.model.data.payment.common.pk.PaymentProcessorResultCodePK; 031 032import com.echothree.model.data.payment.server.entity.PaymentProcessorTransaction; 033import com.echothree.model.data.payment.server.entity.PaymentProcessor; 034import com.echothree.model.data.payment.server.entity.PaymentProcessorActionType; 035import com.echothree.model.data.payment.server.entity.PaymentProcessorResultCode; 036 037import com.echothree.model.data.payment.server.factory.PaymentProcessorTransactionFactory; 038import com.echothree.model.data.payment.server.factory.PaymentProcessorFactory; 039import com.echothree.model.data.payment.server.factory.PaymentProcessorActionTypeFactory; 040import com.echothree.model.data.payment.server.factory.PaymentProcessorResultCodeFactory; 041 042import com.echothree.model.data.payment.common.pk.PaymentProcessorTransactionDetailPK; 043 044import com.echothree.model.data.payment.server.value.PaymentProcessorTransactionDetailValue; 045 046import com.echothree.model.data.payment.server.factory.PaymentProcessorTransactionDetailFactory; 047 048import com.echothree.util.common.exception.PersistenceException; 049import com.echothree.util.common.exception.PersistenceDatabaseException; 050import com.echothree.util.common.exception.PersistenceNotNullException; 051import com.echothree.util.common.exception.PersistenceReadOnlyException; 052 053import com.echothree.util.common.persistence.BasePK; 054 055import com.echothree.util.common.persistence.type.ByteArray; 056 057import com.echothree.util.server.persistence.BaseEntity; 058import com.echothree.util.server.persistence.EntityPermission; 059import com.echothree.util.server.persistence.Session; 060import com.echothree.util.server.persistence.ThreadSession; 061 062import java.io.Serializable; 063 064public class PaymentProcessorTransactionDetail 065 extends BaseEntity 066 implements Serializable { 067 068 private PaymentProcessorTransactionDetailPK _pk; 069 private PaymentProcessorTransactionDetailValue _value; 070 071 /** Creates a new instance of PaymentProcessorTransactionDetail */ 072 public PaymentProcessorTransactionDetail() 073 throws PersistenceException { 074 super(); 075 } 076 077 /** Creates a new instance of PaymentProcessorTransactionDetail */ 078 public PaymentProcessorTransactionDetail(PaymentProcessorTransactionDetailValue value, EntityPermission entityPermission) { 079 super(entityPermission); 080 081 _value = value; 082 _pk = value.getPrimaryKey(); 083 } 084 085 @Override 086 public PaymentProcessorTransactionDetailFactory getBaseFactoryInstance() { 087 return PaymentProcessorTransactionDetailFactory.getInstance(); 088 } 089 090 @Override 091 public boolean hasBeenModified() { 092 return _value.hasBeenModified(); 093 } 094 095 @Override 096 public int hashCode() { 097 return _pk.hashCode(); 098 } 099 100 @Override 101 public String toString() { 102 return _pk.toString(); 103 } 104 105 @Override 106 public boolean equals(Object other) { 107 if(this == other) 108 return true; 109 110 if(other instanceof PaymentProcessorTransactionDetail) { 111 PaymentProcessorTransactionDetail that = (PaymentProcessorTransactionDetail)other; 112 113 PaymentProcessorTransactionDetailValue thatValue = that.getPaymentProcessorTransactionDetailValue(); 114 return _value.equals(thatValue); 115 } else { 116 return false; 117 } 118 } 119 120 @Override 121 public void store(Session session) 122 throws PersistenceDatabaseException { 123 getBaseFactoryInstance().store(session, this); 124 } 125 126 @Override 127 public void remove(Session session) 128 throws PersistenceDatabaseException { 129 getBaseFactoryInstance().remove(session, this); 130 } 131 132 @Override 133 public void remove() 134 throws PersistenceDatabaseException { 135 getBaseFactoryInstance().remove(ThreadSession.currentSession(), this); 136 } 137 138 public PaymentProcessorTransactionDetailValue getPaymentProcessorTransactionDetailValue() { 139 return _value; 140 } 141 142 public void setPaymentProcessorTransactionDetailValue(PaymentProcessorTransactionDetailValue value) 143 throws PersistenceReadOnlyException { 144 checkReadWrite(); 145 _value = value; 146 } 147 148 @Override 149 public PaymentProcessorTransactionDetailPK getPrimaryKey() { 150 return _pk; 151 } 152 153 public PaymentProcessorTransactionPK getPaymentProcessorTransactionPK() { 154 return _value.getPaymentProcessorTransactionPK(); 155 } 156 157 public PaymentProcessorTransaction getPaymentProcessorTransaction(Session session, EntityPermission entityPermission) { 158 return PaymentProcessorTransactionFactory.getInstance().getEntityFromPK(session, entityPermission, getPaymentProcessorTransactionPK()); 159 } 160 161 public PaymentProcessorTransaction getPaymentProcessorTransaction(EntityPermission entityPermission) { 162 return getPaymentProcessorTransaction(ThreadSession.currentSession(), entityPermission); 163 } 164 165 public PaymentProcessorTransaction getPaymentProcessorTransaction(Session session) { 166 return getPaymentProcessorTransaction(session, EntityPermission.READ_ONLY); 167 } 168 169 public PaymentProcessorTransaction getPaymentProcessorTransaction() { 170 return getPaymentProcessorTransaction(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 171 } 172 173 public PaymentProcessorTransaction getPaymentProcessorTransactionForUpdate(Session session) { 174 return getPaymentProcessorTransaction(session, EntityPermission.READ_WRITE); 175 } 176 177 public PaymentProcessorTransaction getPaymentProcessorTransactionForUpdate() { 178 return getPaymentProcessorTransaction(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 179 } 180 181 public void setPaymentProcessorTransactionPK(PaymentProcessorTransactionPK paymentProcessorTransactionPK) 182 throws PersistenceNotNullException, PersistenceReadOnlyException { 183 checkReadWrite(); 184 _value.setPaymentProcessorTransactionPK(paymentProcessorTransactionPK); 185 } 186 187 public void setPaymentProcessorTransaction(PaymentProcessorTransaction entity) { 188 setPaymentProcessorTransactionPK(entity == null? null: entity.getPrimaryKey()); 189 } 190 191 public boolean getPaymentProcessorTransactionPKHasBeenModified() { 192 return _value.getPaymentProcessorTransactionPKHasBeenModified(); 193 } 194 195 public String getPaymentProcessorTransactionName() { 196 return _value.getPaymentProcessorTransactionName(); 197 } 198 199 public void setPaymentProcessorTransactionName(String paymentProcessorTransactionName) 200 throws PersistenceNotNullException, PersistenceReadOnlyException { 201 checkReadWrite(); 202 _value.setPaymentProcessorTransactionName(paymentProcessorTransactionName); 203 } 204 205 public boolean getPaymentProcessorTransactionNameHasBeenModified() { 206 return _value.getPaymentProcessorTransactionNameHasBeenModified(); 207 } 208 209 public PaymentProcessorPK getPaymentProcessorPK() { 210 return _value.getPaymentProcessorPK(); 211 } 212 213 public PaymentProcessor getPaymentProcessor(Session session, EntityPermission entityPermission) { 214 return PaymentProcessorFactory.getInstance().getEntityFromPK(session, entityPermission, getPaymentProcessorPK()); 215 } 216 217 public PaymentProcessor getPaymentProcessor(EntityPermission entityPermission) { 218 return getPaymentProcessor(ThreadSession.currentSession(), entityPermission); 219 } 220 221 public PaymentProcessor getPaymentProcessor(Session session) { 222 return getPaymentProcessor(session, EntityPermission.READ_ONLY); 223 } 224 225 public PaymentProcessor getPaymentProcessor() { 226 return getPaymentProcessor(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 227 } 228 229 public PaymentProcessor getPaymentProcessorForUpdate(Session session) { 230 return getPaymentProcessor(session, EntityPermission.READ_WRITE); 231 } 232 233 public PaymentProcessor getPaymentProcessorForUpdate() { 234 return getPaymentProcessor(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 235 } 236 237 public void setPaymentProcessorPK(PaymentProcessorPK paymentProcessorPK) 238 throws PersistenceNotNullException, PersistenceReadOnlyException { 239 checkReadWrite(); 240 _value.setPaymentProcessorPK(paymentProcessorPK); 241 } 242 243 public void setPaymentProcessor(PaymentProcessor entity) { 244 setPaymentProcessorPK(entity == null? null: entity.getPrimaryKey()); 245 } 246 247 public boolean getPaymentProcessorPKHasBeenModified() { 248 return _value.getPaymentProcessorPKHasBeenModified(); 249 } 250 251 public PaymentProcessorActionTypePK getPaymentProcessorActionTypePK() { 252 return _value.getPaymentProcessorActionTypePK(); 253 } 254 255 public PaymentProcessorActionType getPaymentProcessorActionType(Session session, EntityPermission entityPermission) { 256 return PaymentProcessorActionTypeFactory.getInstance().getEntityFromPK(session, entityPermission, getPaymentProcessorActionTypePK()); 257 } 258 259 public PaymentProcessorActionType getPaymentProcessorActionType(EntityPermission entityPermission) { 260 return getPaymentProcessorActionType(ThreadSession.currentSession(), entityPermission); 261 } 262 263 public PaymentProcessorActionType getPaymentProcessorActionType(Session session) { 264 return getPaymentProcessorActionType(session, EntityPermission.READ_ONLY); 265 } 266 267 public PaymentProcessorActionType getPaymentProcessorActionType() { 268 return getPaymentProcessorActionType(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 269 } 270 271 public PaymentProcessorActionType getPaymentProcessorActionTypeForUpdate(Session session) { 272 return getPaymentProcessorActionType(session, EntityPermission.READ_WRITE); 273 } 274 275 public PaymentProcessorActionType getPaymentProcessorActionTypeForUpdate() { 276 return getPaymentProcessorActionType(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 277 } 278 279 public void setPaymentProcessorActionTypePK(PaymentProcessorActionTypePK paymentProcessorActionTypePK) 280 throws PersistenceNotNullException, PersistenceReadOnlyException { 281 checkReadWrite(); 282 _value.setPaymentProcessorActionTypePK(paymentProcessorActionTypePK); 283 } 284 285 public void setPaymentProcessorActionType(PaymentProcessorActionType entity) { 286 setPaymentProcessorActionTypePK(entity == null? null: entity.getPrimaryKey()); 287 } 288 289 public boolean getPaymentProcessorActionTypePKHasBeenModified() { 290 return _value.getPaymentProcessorActionTypePKHasBeenModified(); 291 } 292 293 public PaymentProcessorResultCodePK getPaymentProcessorResultCodePK() { 294 return _value.getPaymentProcessorResultCodePK(); 295 } 296 297 public PaymentProcessorResultCode getPaymentProcessorResultCode(Session session, EntityPermission entityPermission) { 298 return PaymentProcessorResultCodeFactory.getInstance().getEntityFromPK(session, entityPermission, getPaymentProcessorResultCodePK()); 299 } 300 301 public PaymentProcessorResultCode getPaymentProcessorResultCode(EntityPermission entityPermission) { 302 return getPaymentProcessorResultCode(ThreadSession.currentSession(), entityPermission); 303 } 304 305 public PaymentProcessorResultCode getPaymentProcessorResultCode(Session session) { 306 return getPaymentProcessorResultCode(session, EntityPermission.READ_ONLY); 307 } 308 309 public PaymentProcessorResultCode getPaymentProcessorResultCode() { 310 return getPaymentProcessorResultCode(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 311 } 312 313 public PaymentProcessorResultCode getPaymentProcessorResultCodeForUpdate(Session session) { 314 return getPaymentProcessorResultCode(session, EntityPermission.READ_WRITE); 315 } 316 317 public PaymentProcessorResultCode getPaymentProcessorResultCodeForUpdate() { 318 return getPaymentProcessorResultCode(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 319 } 320 321 public void setPaymentProcessorResultCodePK(PaymentProcessorResultCodePK paymentProcessorResultCodePK) 322 throws PersistenceNotNullException, PersistenceReadOnlyException { 323 checkReadWrite(); 324 _value.setPaymentProcessorResultCodePK(paymentProcessorResultCodePK); 325 } 326 327 public void setPaymentProcessorResultCode(PaymentProcessorResultCode entity) { 328 setPaymentProcessorResultCodePK(entity == null? null: entity.getPrimaryKey()); 329 } 330 331 public boolean getPaymentProcessorResultCodePKHasBeenModified() { 332 return _value.getPaymentProcessorResultCodePKHasBeenModified(); 333 } 334 335 public Long getFromTime() { 336 return _value.getFromTime(); 337 } 338 339 public void setFromTime(Long fromTime) 340 throws PersistenceNotNullException, PersistenceReadOnlyException { 341 checkReadWrite(); 342 _value.setFromTime(fromTime); 343 } 344 345 public boolean getFromTimeHasBeenModified() { 346 return _value.getFromTimeHasBeenModified(); 347 } 348 349 public Long getThruTime() { 350 return _value.getThruTime(); 351 } 352 353 public void setThruTime(Long thruTime) 354 throws PersistenceNotNullException, PersistenceReadOnlyException { 355 checkReadWrite(); 356 _value.setThruTime(thruTime); 357 } 358 359 public boolean getThruTimeHasBeenModified() { 360 return _value.getThruTimeHasBeenModified(); 361 } 362 363}