001// -------------------------------------------------------------------------------- 002// Copyright 2002-2026 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 064import javax.annotation.Nonnull; 065import javax.annotation.Nullable; 066 067public class PaymentProcessorTransactionDetail 068 extends BaseEntity 069 implements Serializable { 070 071 private PaymentProcessorTransactionDetailPK _pk; 072 private PaymentProcessorTransactionDetailValue _value; 073 074 /** Creates a new instance of PaymentProcessorTransactionDetail */ 075 public PaymentProcessorTransactionDetail() 076 throws PersistenceException { 077 super(); 078 } 079 080 /** Creates a new instance of PaymentProcessorTransactionDetail */ 081 public PaymentProcessorTransactionDetail(PaymentProcessorTransactionDetailValue value, EntityPermission entityPermission) { 082 super(entityPermission); 083 084 _value = value; 085 _pk = value.getPrimaryKey(); 086 } 087 088 @Override 089 @Nonnull 090 public PaymentProcessorTransactionDetailFactory getBaseFactoryInstance() { 091 return PaymentProcessorTransactionDetailFactory.getInstance(); 092 } 093 094 @Override 095 public boolean hasBeenModified() { 096 return _value.hasBeenModified(); 097 } 098 099 @Override 100 public int hashCode() { 101 return _pk.hashCode(); 102 } 103 104 @Override 105 @Nonnull 106 public String toString() { 107 return _pk.toString(); 108 } 109 110 @Override 111 public boolean equals(Object other) { 112 if(this == other) 113 return true; 114 115 if(other instanceof PaymentProcessorTransactionDetail that) { 116 PaymentProcessorTransactionDetailValue thatValue = that.getPaymentProcessorTransactionDetailValue(); 117 return _value.equals(thatValue); 118 } else { 119 return false; 120 } 121 } 122 123 @Override 124 public void store() 125 throws PersistenceDatabaseException { 126 getBaseFactoryInstance().store(this); 127 } 128 129 @Override 130 public void remove() 131 throws PersistenceDatabaseException { 132 getBaseFactoryInstance().remove(this); 133 } 134 135 @Nonnull 136 public PaymentProcessorTransactionDetailValue getPaymentProcessorTransactionDetailValue() { 137 return _value; 138 } 139 140 public void setPaymentProcessorTransactionDetailValue(@Nonnull PaymentProcessorTransactionDetailValue value) 141 throws PersistenceReadOnlyException { 142 checkReadWrite(); 143 _value = value; 144 } 145 146 @Override 147 @Nonnull 148 public PaymentProcessorTransactionDetailPK getPrimaryKey() { 149 return _pk; 150 } 151 152 @Nonnull 153 public PaymentProcessorTransactionPK getPaymentProcessorTransactionPK() { 154 return _value.getPaymentProcessorTransactionPK(); 155 } 156 157 @Nonnull 158 public PaymentProcessorTransaction getPaymentProcessorTransaction(EntityPermission entityPermission) { 159 return PaymentProcessorTransactionFactory.getInstance().getEntityFromPK(entityPermission, getPaymentProcessorTransactionPK()); 160 } 161 162 @Nonnull 163 public PaymentProcessorTransaction getPaymentProcessorTransaction() { 164 return getPaymentProcessorTransaction(EntityPermission.READ_ONLY); 165 } 166 167 @Nonnull 168 public PaymentProcessorTransaction getPaymentProcessorTransactionForUpdate() { 169 return getPaymentProcessorTransaction(EntityPermission.READ_WRITE); 170 } 171 172 public void setPaymentProcessorTransactionPK(@Nonnull PaymentProcessorTransactionPK paymentProcessorTransactionPK) 173 throws PersistenceNotNullException, PersistenceReadOnlyException { 174 checkReadWrite(); 175 _value.setPaymentProcessorTransactionPK(paymentProcessorTransactionPK); 176 } 177 178 public void setPaymentProcessorTransaction(@Nonnull PaymentProcessorTransaction entity) { 179 setPaymentProcessorTransactionPK(entity == null ? null : entity.getPrimaryKey()); 180 } 181 182 public boolean getPaymentProcessorTransactionPKHasBeenModified() { 183 return _value.getPaymentProcessorTransactionPKHasBeenModified(); 184 } 185 186 @Nonnull 187 public String getPaymentProcessorTransactionName() { 188 return _value.getPaymentProcessorTransactionName(); 189 } 190 191 public void setPaymentProcessorTransactionName(@Nonnull String paymentProcessorTransactionName) 192 throws PersistenceNotNullException, PersistenceReadOnlyException { 193 checkReadWrite(); 194 _value.setPaymentProcessorTransactionName(paymentProcessorTransactionName); 195 } 196 197 public boolean getPaymentProcessorTransactionNameHasBeenModified() { 198 return _value.getPaymentProcessorTransactionNameHasBeenModified(); 199 } 200 201 @Nonnull 202 public PaymentProcessorPK getPaymentProcessorPK() { 203 return _value.getPaymentProcessorPK(); 204 } 205 206 @Nonnull 207 public PaymentProcessor getPaymentProcessor(EntityPermission entityPermission) { 208 return PaymentProcessorFactory.getInstance().getEntityFromPK(entityPermission, getPaymentProcessorPK()); 209 } 210 211 @Nonnull 212 public PaymentProcessor getPaymentProcessor() { 213 return getPaymentProcessor(EntityPermission.READ_ONLY); 214 } 215 216 @Nonnull 217 public PaymentProcessor getPaymentProcessorForUpdate() { 218 return getPaymentProcessor(EntityPermission.READ_WRITE); 219 } 220 221 public void setPaymentProcessorPK(@Nonnull PaymentProcessorPK paymentProcessorPK) 222 throws PersistenceNotNullException, PersistenceReadOnlyException { 223 checkReadWrite(); 224 _value.setPaymentProcessorPK(paymentProcessorPK); 225 } 226 227 public void setPaymentProcessor(@Nonnull PaymentProcessor entity) { 228 setPaymentProcessorPK(entity == null ? null : entity.getPrimaryKey()); 229 } 230 231 public boolean getPaymentProcessorPKHasBeenModified() { 232 return _value.getPaymentProcessorPKHasBeenModified(); 233 } 234 235 @Nonnull 236 public PaymentProcessorActionTypePK getPaymentProcessorActionTypePK() { 237 return _value.getPaymentProcessorActionTypePK(); 238 } 239 240 @Nonnull 241 public PaymentProcessorActionType getPaymentProcessorActionType(EntityPermission entityPermission) { 242 return PaymentProcessorActionTypeFactory.getInstance().getEntityFromPK(entityPermission, getPaymentProcessorActionTypePK()); 243 } 244 245 @Nonnull 246 public PaymentProcessorActionType getPaymentProcessorActionType() { 247 return getPaymentProcessorActionType(EntityPermission.READ_ONLY); 248 } 249 250 @Nonnull 251 public PaymentProcessorActionType getPaymentProcessorActionTypeForUpdate() { 252 return getPaymentProcessorActionType(EntityPermission.READ_WRITE); 253 } 254 255 public void setPaymentProcessorActionTypePK(@Nonnull PaymentProcessorActionTypePK paymentProcessorActionTypePK) 256 throws PersistenceNotNullException, PersistenceReadOnlyException { 257 checkReadWrite(); 258 _value.setPaymentProcessorActionTypePK(paymentProcessorActionTypePK); 259 } 260 261 public void setPaymentProcessorActionType(@Nonnull PaymentProcessorActionType entity) { 262 setPaymentProcessorActionTypePK(entity == null ? null : entity.getPrimaryKey()); 263 } 264 265 public boolean getPaymentProcessorActionTypePKHasBeenModified() { 266 return _value.getPaymentProcessorActionTypePKHasBeenModified(); 267 } 268 269 @Nonnull 270 public PaymentProcessorResultCodePK getPaymentProcessorResultCodePK() { 271 return _value.getPaymentProcessorResultCodePK(); 272 } 273 274 @Nonnull 275 public PaymentProcessorResultCode getPaymentProcessorResultCode(EntityPermission entityPermission) { 276 return PaymentProcessorResultCodeFactory.getInstance().getEntityFromPK(entityPermission, getPaymentProcessorResultCodePK()); 277 } 278 279 @Nonnull 280 public PaymentProcessorResultCode getPaymentProcessorResultCode() { 281 return getPaymentProcessorResultCode(EntityPermission.READ_ONLY); 282 } 283 284 @Nonnull 285 public PaymentProcessorResultCode getPaymentProcessorResultCodeForUpdate() { 286 return getPaymentProcessorResultCode(EntityPermission.READ_WRITE); 287 } 288 289 public void setPaymentProcessorResultCodePK(@Nonnull PaymentProcessorResultCodePK paymentProcessorResultCodePK) 290 throws PersistenceNotNullException, PersistenceReadOnlyException { 291 checkReadWrite(); 292 _value.setPaymentProcessorResultCodePK(paymentProcessorResultCodePK); 293 } 294 295 public void setPaymentProcessorResultCode(@Nonnull PaymentProcessorResultCode entity) { 296 setPaymentProcessorResultCodePK(entity == null ? null : entity.getPrimaryKey()); 297 } 298 299 public boolean getPaymentProcessorResultCodePKHasBeenModified() { 300 return _value.getPaymentProcessorResultCodePKHasBeenModified(); 301 } 302 303 @Nonnull 304 public Long getFromTime() { 305 return _value.getFromTime(); 306 } 307 308 public void setFromTime(@Nonnull Long fromTime) 309 throws PersistenceNotNullException, PersistenceReadOnlyException { 310 checkReadWrite(); 311 _value.setFromTime(fromTime); 312 } 313 314 public boolean getFromTimeHasBeenModified() { 315 return _value.getFromTimeHasBeenModified(); 316 } 317 318 @Nonnull 319 public Long getThruTime() { 320 return _value.getThruTime(); 321 } 322 323 public void setThruTime(@Nonnull Long thruTime) 324 throws PersistenceNotNullException, PersistenceReadOnlyException { 325 checkReadWrite(); 326 _value.setThruTime(thruTime); 327 } 328 329 public boolean getThruTimeHasBeenModified() { 330 return _value.getThruTimeHasBeenModified(); 331 } 332 333}