001// -------------------------------------------------------------------------------- 002// Copyright 2002-2025 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 that) { 111 PaymentProcessorTransactionDetailValue thatValue = that.getPaymentProcessorTransactionDetailValue(); 112 return _value.equals(thatValue); 113 } else { 114 return false; 115 } 116 } 117 118 @Override 119 public void store(Session session) 120 throws PersistenceDatabaseException { 121 getBaseFactoryInstance().store(session, this); 122 } 123 124 @Override 125 public void remove(Session session) 126 throws PersistenceDatabaseException { 127 getBaseFactoryInstance().remove(session, this); 128 } 129 130 @Override 131 public void remove() 132 throws PersistenceDatabaseException { 133 getBaseFactoryInstance().remove(ThreadSession.currentSession(), this); 134 } 135 136 public PaymentProcessorTransactionDetailValue getPaymentProcessorTransactionDetailValue() { 137 return _value; 138 } 139 140 public void setPaymentProcessorTransactionDetailValue(PaymentProcessorTransactionDetailValue value) 141 throws PersistenceReadOnlyException { 142 checkReadWrite(); 143 _value = value; 144 } 145 146 @Override 147 public PaymentProcessorTransactionDetailPK getPrimaryKey() { 148 return _pk; 149 } 150 151 public PaymentProcessorTransactionPK getPaymentProcessorTransactionPK() { 152 return _value.getPaymentProcessorTransactionPK(); 153 } 154 155 public PaymentProcessorTransaction getPaymentProcessorTransaction(Session session, EntityPermission entityPermission) { 156 return PaymentProcessorTransactionFactory.getInstance().getEntityFromPK(session, entityPermission, getPaymentProcessorTransactionPK()); 157 } 158 159 public PaymentProcessorTransaction getPaymentProcessorTransaction(EntityPermission entityPermission) { 160 return getPaymentProcessorTransaction(ThreadSession.currentSession(), entityPermission); 161 } 162 163 public PaymentProcessorTransaction getPaymentProcessorTransaction(Session session) { 164 return getPaymentProcessorTransaction(session, EntityPermission.READ_ONLY); 165 } 166 167 public PaymentProcessorTransaction getPaymentProcessorTransaction() { 168 return getPaymentProcessorTransaction(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 169 } 170 171 public PaymentProcessorTransaction getPaymentProcessorTransactionForUpdate(Session session) { 172 return getPaymentProcessorTransaction(session, EntityPermission.READ_WRITE); 173 } 174 175 public PaymentProcessorTransaction getPaymentProcessorTransactionForUpdate() { 176 return getPaymentProcessorTransaction(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 177 } 178 179 public void setPaymentProcessorTransactionPK(PaymentProcessorTransactionPK paymentProcessorTransactionPK) 180 throws PersistenceNotNullException, PersistenceReadOnlyException { 181 checkReadWrite(); 182 _value.setPaymentProcessorTransactionPK(paymentProcessorTransactionPK); 183 } 184 185 public void setPaymentProcessorTransaction(PaymentProcessorTransaction entity) { 186 setPaymentProcessorTransactionPK(entity == null? null: entity.getPrimaryKey()); 187 } 188 189 public boolean getPaymentProcessorTransactionPKHasBeenModified() { 190 return _value.getPaymentProcessorTransactionPKHasBeenModified(); 191 } 192 193 public String getPaymentProcessorTransactionName() { 194 return _value.getPaymentProcessorTransactionName(); 195 } 196 197 public void setPaymentProcessorTransactionName(String paymentProcessorTransactionName) 198 throws PersistenceNotNullException, PersistenceReadOnlyException { 199 checkReadWrite(); 200 _value.setPaymentProcessorTransactionName(paymentProcessorTransactionName); 201 } 202 203 public boolean getPaymentProcessorTransactionNameHasBeenModified() { 204 return _value.getPaymentProcessorTransactionNameHasBeenModified(); 205 } 206 207 public PaymentProcessorPK getPaymentProcessorPK() { 208 return _value.getPaymentProcessorPK(); 209 } 210 211 public PaymentProcessor getPaymentProcessor(Session session, EntityPermission entityPermission) { 212 return PaymentProcessorFactory.getInstance().getEntityFromPK(session, entityPermission, getPaymentProcessorPK()); 213 } 214 215 public PaymentProcessor getPaymentProcessor(EntityPermission entityPermission) { 216 return getPaymentProcessor(ThreadSession.currentSession(), entityPermission); 217 } 218 219 public PaymentProcessor getPaymentProcessor(Session session) { 220 return getPaymentProcessor(session, EntityPermission.READ_ONLY); 221 } 222 223 public PaymentProcessor getPaymentProcessor() { 224 return getPaymentProcessor(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 225 } 226 227 public PaymentProcessor getPaymentProcessorForUpdate(Session session) { 228 return getPaymentProcessor(session, EntityPermission.READ_WRITE); 229 } 230 231 public PaymentProcessor getPaymentProcessorForUpdate() { 232 return getPaymentProcessor(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 233 } 234 235 public void setPaymentProcessorPK(PaymentProcessorPK paymentProcessorPK) 236 throws PersistenceNotNullException, PersistenceReadOnlyException { 237 checkReadWrite(); 238 _value.setPaymentProcessorPK(paymentProcessorPK); 239 } 240 241 public void setPaymentProcessor(PaymentProcessor entity) { 242 setPaymentProcessorPK(entity == null? null: entity.getPrimaryKey()); 243 } 244 245 public boolean getPaymentProcessorPKHasBeenModified() { 246 return _value.getPaymentProcessorPKHasBeenModified(); 247 } 248 249 public PaymentProcessorActionTypePK getPaymentProcessorActionTypePK() { 250 return _value.getPaymentProcessorActionTypePK(); 251 } 252 253 public PaymentProcessorActionType getPaymentProcessorActionType(Session session, EntityPermission entityPermission) { 254 return PaymentProcessorActionTypeFactory.getInstance().getEntityFromPK(session, entityPermission, getPaymentProcessorActionTypePK()); 255 } 256 257 public PaymentProcessorActionType getPaymentProcessorActionType(EntityPermission entityPermission) { 258 return getPaymentProcessorActionType(ThreadSession.currentSession(), entityPermission); 259 } 260 261 public PaymentProcessorActionType getPaymentProcessorActionType(Session session) { 262 return getPaymentProcessorActionType(session, EntityPermission.READ_ONLY); 263 } 264 265 public PaymentProcessorActionType getPaymentProcessorActionType() { 266 return getPaymentProcessorActionType(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 267 } 268 269 public PaymentProcessorActionType getPaymentProcessorActionTypeForUpdate(Session session) { 270 return getPaymentProcessorActionType(session, EntityPermission.READ_WRITE); 271 } 272 273 public PaymentProcessorActionType getPaymentProcessorActionTypeForUpdate() { 274 return getPaymentProcessorActionType(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 275 } 276 277 public void setPaymentProcessorActionTypePK(PaymentProcessorActionTypePK paymentProcessorActionTypePK) 278 throws PersistenceNotNullException, PersistenceReadOnlyException { 279 checkReadWrite(); 280 _value.setPaymentProcessorActionTypePK(paymentProcessorActionTypePK); 281 } 282 283 public void setPaymentProcessorActionType(PaymentProcessorActionType entity) { 284 setPaymentProcessorActionTypePK(entity == null? null: entity.getPrimaryKey()); 285 } 286 287 public boolean getPaymentProcessorActionTypePKHasBeenModified() { 288 return _value.getPaymentProcessorActionTypePKHasBeenModified(); 289 } 290 291 public PaymentProcessorResultCodePK getPaymentProcessorResultCodePK() { 292 return _value.getPaymentProcessorResultCodePK(); 293 } 294 295 public PaymentProcessorResultCode getPaymentProcessorResultCode(Session session, EntityPermission entityPermission) { 296 return PaymentProcessorResultCodeFactory.getInstance().getEntityFromPK(session, entityPermission, getPaymentProcessorResultCodePK()); 297 } 298 299 public PaymentProcessorResultCode getPaymentProcessorResultCode(EntityPermission entityPermission) { 300 return getPaymentProcessorResultCode(ThreadSession.currentSession(), entityPermission); 301 } 302 303 public PaymentProcessorResultCode getPaymentProcessorResultCode(Session session) { 304 return getPaymentProcessorResultCode(session, EntityPermission.READ_ONLY); 305 } 306 307 public PaymentProcessorResultCode getPaymentProcessorResultCode() { 308 return getPaymentProcessorResultCode(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 309 } 310 311 public PaymentProcessorResultCode getPaymentProcessorResultCodeForUpdate(Session session) { 312 return getPaymentProcessorResultCode(session, EntityPermission.READ_WRITE); 313 } 314 315 public PaymentProcessorResultCode getPaymentProcessorResultCodeForUpdate() { 316 return getPaymentProcessorResultCode(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 317 } 318 319 public void setPaymentProcessorResultCodePK(PaymentProcessorResultCodePK paymentProcessorResultCodePK) 320 throws PersistenceNotNullException, PersistenceReadOnlyException { 321 checkReadWrite(); 322 _value.setPaymentProcessorResultCodePK(paymentProcessorResultCodePK); 323 } 324 325 public void setPaymentProcessorResultCode(PaymentProcessorResultCode entity) { 326 setPaymentProcessorResultCodePK(entity == null? null: entity.getPrimaryKey()); 327 } 328 329 public boolean getPaymentProcessorResultCodePKHasBeenModified() { 330 return _value.getPaymentProcessorResultCodePKHasBeenModified(); 331 } 332 333 public Long getFromTime() { 334 return _value.getFromTime(); 335 } 336 337 public void setFromTime(Long fromTime) 338 throws PersistenceNotNullException, PersistenceReadOnlyException { 339 checkReadWrite(); 340 _value.setFromTime(fromTime); 341 } 342 343 public boolean getFromTimeHasBeenModified() { 344 return _value.getFromTimeHasBeenModified(); 345 } 346 347 public Long getThruTime() { 348 return _value.getThruTime(); 349 } 350 351 public void setThruTime(Long thruTime) 352 throws PersistenceNotNullException, PersistenceReadOnlyException { 353 checkReadWrite(); 354 _value.setThruTime(thruTime); 355 } 356 357 public boolean getThruTimeHasBeenModified() { 358 return _value.getThruTimeHasBeenModified(); 359 } 360 361}