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 * OrderShipmentGroupDetail.java 021 */ 022 023package com.echothree.model.data.order.server.entity; 024 025import com.echothree.model.data.order.common.pk.OrderShipmentGroupDetailPK; 026 027import com.echothree.model.data.order.common.pk.OrderShipmentGroupPK; 028import com.echothree.model.data.order.common.pk.OrderPK; 029import com.echothree.model.data.item.common.pk.ItemDeliveryTypePK; 030import com.echothree.model.data.contact.common.pk.PartyContactMechanismPK; 031import com.echothree.model.data.shipping.common.pk.ShippingMethodPK; 032 033import com.echothree.model.data.order.server.entity.OrderShipmentGroup; 034import com.echothree.model.data.order.server.entity.Order; 035import com.echothree.model.data.item.server.entity.ItemDeliveryType; 036import com.echothree.model.data.contact.server.entity.PartyContactMechanism; 037import com.echothree.model.data.shipping.server.entity.ShippingMethod; 038 039import com.echothree.model.data.order.server.factory.OrderShipmentGroupFactory; 040import com.echothree.model.data.order.server.factory.OrderFactory; 041import com.echothree.model.data.item.server.factory.ItemDeliveryTypeFactory; 042import com.echothree.model.data.contact.server.factory.PartyContactMechanismFactory; 043import com.echothree.model.data.shipping.server.factory.ShippingMethodFactory; 044 045import com.echothree.model.data.order.common.pk.OrderShipmentGroupDetailPK; 046 047import com.echothree.model.data.order.server.value.OrderShipmentGroupDetailValue; 048 049import com.echothree.model.data.order.server.factory.OrderShipmentGroupDetailFactory; 050 051import com.echothree.util.common.exception.PersistenceException; 052import com.echothree.util.common.exception.PersistenceDatabaseException; 053import com.echothree.util.common.exception.PersistenceNotNullException; 054import com.echothree.util.common.exception.PersistenceReadOnlyException; 055 056import com.echothree.util.common.persistence.BasePK; 057 058import com.echothree.util.common.persistence.type.ByteArray; 059 060import com.echothree.util.server.persistence.BaseEntity; 061import com.echothree.util.server.persistence.EntityPermission; 062import com.echothree.util.server.persistence.Session; 063import com.echothree.util.server.persistence.ThreadSession; 064 065import java.io.Serializable; 066 067public class OrderShipmentGroupDetail 068 extends BaseEntity 069 implements Serializable { 070 071 private OrderShipmentGroupDetailPK _pk; 072 private OrderShipmentGroupDetailValue _value; 073 074 /** Creates a new instance of OrderShipmentGroupDetail */ 075 public OrderShipmentGroupDetail() 076 throws PersistenceException { 077 super(); 078 } 079 080 /** Creates a new instance of OrderShipmentGroupDetail */ 081 public OrderShipmentGroupDetail(OrderShipmentGroupDetailValue value, EntityPermission entityPermission) { 082 super(entityPermission); 083 084 _value = value; 085 _pk = value.getPrimaryKey(); 086 } 087 088 @Override 089 public OrderShipmentGroupDetailFactory getBaseFactoryInstance() { 090 return OrderShipmentGroupDetailFactory.getInstance(); 091 } 092 093 @Override 094 public boolean hasBeenModified() { 095 return _value.hasBeenModified(); 096 } 097 098 @Override 099 public int hashCode() { 100 return _pk.hashCode(); 101 } 102 103 @Override 104 public String toString() { 105 return _pk.toString(); 106 } 107 108 @Override 109 public boolean equals(Object other) { 110 if(this == other) 111 return true; 112 113 if(other instanceof OrderShipmentGroupDetail that) { 114 OrderShipmentGroupDetailValue thatValue = that.getOrderShipmentGroupDetailValue(); 115 return _value.equals(thatValue); 116 } else { 117 return false; 118 } 119 } 120 121 @Override 122 public void store(Session session) 123 throws PersistenceDatabaseException { 124 getBaseFactoryInstance().store(session, this); 125 } 126 127 @Override 128 public void remove(Session session) 129 throws PersistenceDatabaseException { 130 getBaseFactoryInstance().remove(session, this); 131 } 132 133 @Override 134 public void remove() 135 throws PersistenceDatabaseException { 136 getBaseFactoryInstance().remove(ThreadSession.currentSession(), this); 137 } 138 139 public OrderShipmentGroupDetailValue getOrderShipmentGroupDetailValue() { 140 return _value; 141 } 142 143 public void setOrderShipmentGroupDetailValue(OrderShipmentGroupDetailValue value) 144 throws PersistenceReadOnlyException { 145 checkReadWrite(); 146 _value = value; 147 } 148 149 @Override 150 public OrderShipmentGroupDetailPK getPrimaryKey() { 151 return _pk; 152 } 153 154 public OrderShipmentGroupPK getOrderShipmentGroupPK() { 155 return _value.getOrderShipmentGroupPK(); 156 } 157 158 public OrderShipmentGroup getOrderShipmentGroup(Session session, EntityPermission entityPermission) { 159 return OrderShipmentGroupFactory.getInstance().getEntityFromPK(session, entityPermission, getOrderShipmentGroupPK()); 160 } 161 162 public OrderShipmentGroup getOrderShipmentGroup(EntityPermission entityPermission) { 163 return getOrderShipmentGroup(ThreadSession.currentSession(), entityPermission); 164 } 165 166 public OrderShipmentGroup getOrderShipmentGroup(Session session) { 167 return getOrderShipmentGroup(session, EntityPermission.READ_ONLY); 168 } 169 170 public OrderShipmentGroup getOrderShipmentGroup() { 171 return getOrderShipmentGroup(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 172 } 173 174 public OrderShipmentGroup getOrderShipmentGroupForUpdate(Session session) { 175 return getOrderShipmentGroup(session, EntityPermission.READ_WRITE); 176 } 177 178 public OrderShipmentGroup getOrderShipmentGroupForUpdate() { 179 return getOrderShipmentGroup(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 180 } 181 182 public void setOrderShipmentGroupPK(OrderShipmentGroupPK orderShipmentGroupPK) 183 throws PersistenceNotNullException, PersistenceReadOnlyException { 184 checkReadWrite(); 185 _value.setOrderShipmentGroupPK(orderShipmentGroupPK); 186 } 187 188 public void setOrderShipmentGroup(OrderShipmentGroup entity) { 189 setOrderShipmentGroupPK(entity == null? null: entity.getPrimaryKey()); 190 } 191 192 public boolean getOrderShipmentGroupPKHasBeenModified() { 193 return _value.getOrderShipmentGroupPKHasBeenModified(); 194 } 195 196 public OrderPK getOrderPK() { 197 return _value.getOrderPK(); 198 } 199 200 public Order getOrder(Session session, EntityPermission entityPermission) { 201 return OrderFactory.getInstance().getEntityFromPK(session, entityPermission, getOrderPK()); 202 } 203 204 public Order getOrder(EntityPermission entityPermission) { 205 return getOrder(ThreadSession.currentSession(), entityPermission); 206 } 207 208 public Order getOrder(Session session) { 209 return getOrder(session, EntityPermission.READ_ONLY); 210 } 211 212 public Order getOrder() { 213 return getOrder(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 214 } 215 216 public Order getOrderForUpdate(Session session) { 217 return getOrder(session, EntityPermission.READ_WRITE); 218 } 219 220 public Order getOrderForUpdate() { 221 return getOrder(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 222 } 223 224 public void setOrderPK(OrderPK orderPK) 225 throws PersistenceNotNullException, PersistenceReadOnlyException { 226 checkReadWrite(); 227 _value.setOrderPK(orderPK); 228 } 229 230 public void setOrder(Order entity) { 231 setOrderPK(entity == null? null: entity.getPrimaryKey()); 232 } 233 234 public boolean getOrderPKHasBeenModified() { 235 return _value.getOrderPKHasBeenModified(); 236 } 237 238 public Integer getOrderShipmentGroupSequence() { 239 return _value.getOrderShipmentGroupSequence(); 240 } 241 242 public void setOrderShipmentGroupSequence(Integer orderShipmentGroupSequence) 243 throws PersistenceNotNullException, PersistenceReadOnlyException { 244 checkReadWrite(); 245 _value.setOrderShipmentGroupSequence(orderShipmentGroupSequence); 246 } 247 248 public boolean getOrderShipmentGroupSequenceHasBeenModified() { 249 return _value.getOrderShipmentGroupSequenceHasBeenModified(); 250 } 251 252 public ItemDeliveryTypePK getItemDeliveryTypePK() { 253 return _value.getItemDeliveryTypePK(); 254 } 255 256 public ItemDeliveryType getItemDeliveryType(Session session, EntityPermission entityPermission) { 257 return ItemDeliveryTypeFactory.getInstance().getEntityFromPK(session, entityPermission, getItemDeliveryTypePK()); 258 } 259 260 public ItemDeliveryType getItemDeliveryType(EntityPermission entityPermission) { 261 return getItemDeliveryType(ThreadSession.currentSession(), entityPermission); 262 } 263 264 public ItemDeliveryType getItemDeliveryType(Session session) { 265 return getItemDeliveryType(session, EntityPermission.READ_ONLY); 266 } 267 268 public ItemDeliveryType getItemDeliveryType() { 269 return getItemDeliveryType(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 270 } 271 272 public ItemDeliveryType getItemDeliveryTypeForUpdate(Session session) { 273 return getItemDeliveryType(session, EntityPermission.READ_WRITE); 274 } 275 276 public ItemDeliveryType getItemDeliveryTypeForUpdate() { 277 return getItemDeliveryType(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 278 } 279 280 public void setItemDeliveryTypePK(ItemDeliveryTypePK itemDeliveryTypePK) 281 throws PersistenceNotNullException, PersistenceReadOnlyException { 282 checkReadWrite(); 283 _value.setItemDeliveryTypePK(itemDeliveryTypePK); 284 } 285 286 public void setItemDeliveryType(ItemDeliveryType entity) { 287 setItemDeliveryTypePK(entity == null? null: entity.getPrimaryKey()); 288 } 289 290 public boolean getItemDeliveryTypePKHasBeenModified() { 291 return _value.getItemDeliveryTypePKHasBeenModified(); 292 } 293 294 public Boolean getIsDefault() { 295 return _value.getIsDefault(); 296 } 297 298 public void setIsDefault(Boolean isDefault) 299 throws PersistenceNotNullException, PersistenceReadOnlyException { 300 checkReadWrite(); 301 _value.setIsDefault(isDefault); 302 } 303 304 public boolean getIsDefaultHasBeenModified() { 305 return _value.getIsDefaultHasBeenModified(); 306 } 307 308 public PartyContactMechanismPK getPartyContactMechanismPK() { 309 return _value.getPartyContactMechanismPK(); 310 } 311 312 public PartyContactMechanism getPartyContactMechanism(Session session, EntityPermission entityPermission) { 313 PartyContactMechanismPK pk = getPartyContactMechanismPK(); 314 PartyContactMechanism entity = pk == null? null: PartyContactMechanismFactory.getInstance().getEntityFromPK(session, entityPermission, pk); 315 316 return entity; 317 } 318 319 public PartyContactMechanism getPartyContactMechanism(EntityPermission entityPermission) { 320 return getPartyContactMechanism(ThreadSession.currentSession(), entityPermission); 321 } 322 323 public PartyContactMechanism getPartyContactMechanism(Session session) { 324 return getPartyContactMechanism(session, EntityPermission.READ_ONLY); 325 } 326 327 public PartyContactMechanism getPartyContactMechanism() { 328 return getPartyContactMechanism(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 329 } 330 331 public PartyContactMechanism getPartyContactMechanismForUpdate(Session session) { 332 return getPartyContactMechanism(session, EntityPermission.READ_WRITE); 333 } 334 335 public PartyContactMechanism getPartyContactMechanismForUpdate() { 336 return getPartyContactMechanism(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 337 } 338 339 public void setPartyContactMechanismPK(PartyContactMechanismPK partyContactMechanismPK) 340 throws PersistenceNotNullException, PersistenceReadOnlyException { 341 checkReadWrite(); 342 _value.setPartyContactMechanismPK(partyContactMechanismPK); 343 } 344 345 public void setPartyContactMechanism(PartyContactMechanism entity) { 346 setPartyContactMechanismPK(entity == null? null: entity.getPrimaryKey()); 347 } 348 349 public boolean getPartyContactMechanismPKHasBeenModified() { 350 return _value.getPartyContactMechanismPKHasBeenModified(); 351 } 352 353 public ShippingMethodPK getShippingMethodPK() { 354 return _value.getShippingMethodPK(); 355 } 356 357 public ShippingMethod getShippingMethod(Session session, EntityPermission entityPermission) { 358 ShippingMethodPK pk = getShippingMethodPK(); 359 ShippingMethod entity = pk == null? null: ShippingMethodFactory.getInstance().getEntityFromPK(session, entityPermission, pk); 360 361 return entity; 362 } 363 364 public ShippingMethod getShippingMethod(EntityPermission entityPermission) { 365 return getShippingMethod(ThreadSession.currentSession(), entityPermission); 366 } 367 368 public ShippingMethod getShippingMethod(Session session) { 369 return getShippingMethod(session, EntityPermission.READ_ONLY); 370 } 371 372 public ShippingMethod getShippingMethod() { 373 return getShippingMethod(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 374 } 375 376 public ShippingMethod getShippingMethodForUpdate(Session session) { 377 return getShippingMethod(session, EntityPermission.READ_WRITE); 378 } 379 380 public ShippingMethod getShippingMethodForUpdate() { 381 return getShippingMethod(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 382 } 383 384 public void setShippingMethodPK(ShippingMethodPK shippingMethodPK) 385 throws PersistenceNotNullException, PersistenceReadOnlyException { 386 checkReadWrite(); 387 _value.setShippingMethodPK(shippingMethodPK); 388 } 389 390 public void setShippingMethod(ShippingMethod entity) { 391 setShippingMethodPK(entity == null? null: entity.getPrimaryKey()); 392 } 393 394 public boolean getShippingMethodPKHasBeenModified() { 395 return _value.getShippingMethodPKHasBeenModified(); 396 } 397 398 public Boolean getHoldUntilComplete() { 399 return _value.getHoldUntilComplete(); 400 } 401 402 public void setHoldUntilComplete(Boolean holdUntilComplete) 403 throws PersistenceNotNullException, PersistenceReadOnlyException { 404 checkReadWrite(); 405 _value.setHoldUntilComplete(holdUntilComplete); 406 } 407 408 public boolean getHoldUntilCompleteHasBeenModified() { 409 return _value.getHoldUntilCompleteHasBeenModified(); 410 } 411 412 public Long getFromTime() { 413 return _value.getFromTime(); 414 } 415 416 public void setFromTime(Long fromTime) 417 throws PersistenceNotNullException, PersistenceReadOnlyException { 418 checkReadWrite(); 419 _value.setFromTime(fromTime); 420 } 421 422 public boolean getFromTimeHasBeenModified() { 423 return _value.getFromTimeHasBeenModified(); 424 } 425 426 public Long getThruTime() { 427 return _value.getThruTime(); 428 } 429 430 public void setThruTime(Long thruTime) 431 throws PersistenceNotNullException, PersistenceReadOnlyException { 432 checkReadWrite(); 433 _value.setThruTime(thruTime); 434 } 435 436 public boolean getThruTimeHasBeenModified() { 437 return _value.getThruTimeHasBeenModified(); 438 } 439 440}