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 * ItemHarmonizedTariffScheduleCodeDetail.java 021 */ 022 023package com.echothree.model.data.item.server.entity; 024 025import com.echothree.model.data.item.common.pk.ItemHarmonizedTariffScheduleCodeDetailPK; 026 027import com.echothree.model.data.item.common.pk.ItemHarmonizedTariffScheduleCodePK; 028import com.echothree.model.data.item.common.pk.ItemPK; 029import com.echothree.model.data.geo.common.pk.GeoCodePK; 030import com.echothree.model.data.item.common.pk.HarmonizedTariffScheduleCodeUseTypePK; 031import com.echothree.model.data.item.common.pk.HarmonizedTariffScheduleCodePK; 032 033import com.echothree.model.data.item.server.entity.ItemHarmonizedTariffScheduleCode; 034import com.echothree.model.data.item.server.entity.Item; 035import com.echothree.model.data.geo.server.entity.GeoCode; 036import com.echothree.model.data.item.server.entity.HarmonizedTariffScheduleCodeUseType; 037import com.echothree.model.data.item.server.entity.HarmonizedTariffScheduleCode; 038 039import com.echothree.model.data.item.server.factory.ItemHarmonizedTariffScheduleCodeFactory; 040import com.echothree.model.data.item.server.factory.ItemFactory; 041import com.echothree.model.data.geo.server.factory.GeoCodeFactory; 042import com.echothree.model.data.item.server.factory.HarmonizedTariffScheduleCodeUseTypeFactory; 043import com.echothree.model.data.item.server.factory.HarmonizedTariffScheduleCodeFactory; 044 045import com.echothree.model.data.item.common.pk.ItemHarmonizedTariffScheduleCodeDetailPK; 046 047import com.echothree.model.data.item.server.value.ItemHarmonizedTariffScheduleCodeDetailValue; 048 049import com.echothree.model.data.item.server.factory.ItemHarmonizedTariffScheduleCodeDetailFactory; 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 ItemHarmonizedTariffScheduleCodeDetail 068 extends BaseEntity 069 implements Serializable { 070 071 private ItemHarmonizedTariffScheduleCodeDetailPK _pk; 072 private ItemHarmonizedTariffScheduleCodeDetailValue _value; 073 074 /** Creates a new instance of ItemHarmonizedTariffScheduleCodeDetail */ 075 public ItemHarmonizedTariffScheduleCodeDetail() 076 throws PersistenceException { 077 super(); 078 } 079 080 /** Creates a new instance of ItemHarmonizedTariffScheduleCodeDetail */ 081 public ItemHarmonizedTariffScheduleCodeDetail(ItemHarmonizedTariffScheduleCodeDetailValue value, EntityPermission entityPermission) { 082 super(entityPermission); 083 084 _value = value; 085 _pk = value.getPrimaryKey(); 086 } 087 088 @Override 089 public ItemHarmonizedTariffScheduleCodeDetailFactory getBaseFactoryInstance() { 090 return ItemHarmonizedTariffScheduleCodeDetailFactory.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 ItemHarmonizedTariffScheduleCodeDetail that) { 114 ItemHarmonizedTariffScheduleCodeDetailValue thatValue = that.getItemHarmonizedTariffScheduleCodeDetailValue(); 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 ItemHarmonizedTariffScheduleCodeDetailValue getItemHarmonizedTariffScheduleCodeDetailValue() { 140 return _value; 141 } 142 143 public void setItemHarmonizedTariffScheduleCodeDetailValue(ItemHarmonizedTariffScheduleCodeDetailValue value) 144 throws PersistenceReadOnlyException { 145 checkReadWrite(); 146 _value = value; 147 } 148 149 @Override 150 public ItemHarmonizedTariffScheduleCodeDetailPK getPrimaryKey() { 151 return _pk; 152 } 153 154 public ItemHarmonizedTariffScheduleCodePK getItemHarmonizedTariffScheduleCodePK() { 155 return _value.getItemHarmonizedTariffScheduleCodePK(); 156 } 157 158 public ItemHarmonizedTariffScheduleCode getItemHarmonizedTariffScheduleCode(Session session, EntityPermission entityPermission) { 159 return ItemHarmonizedTariffScheduleCodeFactory.getInstance().getEntityFromPK(session, entityPermission, getItemHarmonizedTariffScheduleCodePK()); 160 } 161 162 public ItemHarmonizedTariffScheduleCode getItemHarmonizedTariffScheduleCode(EntityPermission entityPermission) { 163 return getItemHarmonizedTariffScheduleCode(ThreadSession.currentSession(), entityPermission); 164 } 165 166 public ItemHarmonizedTariffScheduleCode getItemHarmonizedTariffScheduleCode(Session session) { 167 return getItemHarmonizedTariffScheduleCode(session, EntityPermission.READ_ONLY); 168 } 169 170 public ItemHarmonizedTariffScheduleCode getItemHarmonizedTariffScheduleCode() { 171 return getItemHarmonizedTariffScheduleCode(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 172 } 173 174 public ItemHarmonizedTariffScheduleCode getItemHarmonizedTariffScheduleCodeForUpdate(Session session) { 175 return getItemHarmonizedTariffScheduleCode(session, EntityPermission.READ_WRITE); 176 } 177 178 public ItemHarmonizedTariffScheduleCode getItemHarmonizedTariffScheduleCodeForUpdate() { 179 return getItemHarmonizedTariffScheduleCode(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 180 } 181 182 public void setItemHarmonizedTariffScheduleCodePK(ItemHarmonizedTariffScheduleCodePK itemHarmonizedTariffScheduleCodePK) 183 throws PersistenceNotNullException, PersistenceReadOnlyException { 184 checkReadWrite(); 185 _value.setItemHarmonizedTariffScheduleCodePK(itemHarmonizedTariffScheduleCodePK); 186 } 187 188 public void setItemHarmonizedTariffScheduleCode(ItemHarmonizedTariffScheduleCode entity) { 189 setItemHarmonizedTariffScheduleCodePK(entity == null? null: entity.getPrimaryKey()); 190 } 191 192 public boolean getItemHarmonizedTariffScheduleCodePKHasBeenModified() { 193 return _value.getItemHarmonizedTariffScheduleCodePKHasBeenModified(); 194 } 195 196 public ItemPK getItemPK() { 197 return _value.getItemPK(); 198 } 199 200 public Item getItem(Session session, EntityPermission entityPermission) { 201 return ItemFactory.getInstance().getEntityFromPK(session, entityPermission, getItemPK()); 202 } 203 204 public Item getItem(EntityPermission entityPermission) { 205 return getItem(ThreadSession.currentSession(), entityPermission); 206 } 207 208 public Item getItem(Session session) { 209 return getItem(session, EntityPermission.READ_ONLY); 210 } 211 212 public Item getItem() { 213 return getItem(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 214 } 215 216 public Item getItemForUpdate(Session session) { 217 return getItem(session, EntityPermission.READ_WRITE); 218 } 219 220 public Item getItemForUpdate() { 221 return getItem(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 222 } 223 224 public void setItemPK(ItemPK itemPK) 225 throws PersistenceNotNullException, PersistenceReadOnlyException { 226 checkReadWrite(); 227 _value.setItemPK(itemPK); 228 } 229 230 public void setItem(Item entity) { 231 setItemPK(entity == null? null: entity.getPrimaryKey()); 232 } 233 234 public boolean getItemPKHasBeenModified() { 235 return _value.getItemPKHasBeenModified(); 236 } 237 238 public GeoCodePK getCountryGeoCodePK() { 239 return _value.getCountryGeoCodePK(); 240 } 241 242 public GeoCode getCountryGeoCode(Session session, EntityPermission entityPermission) { 243 return GeoCodeFactory.getInstance().getEntityFromPK(session, entityPermission, getCountryGeoCodePK()); 244 } 245 246 public GeoCode getCountryGeoCode(EntityPermission entityPermission) { 247 return getCountryGeoCode(ThreadSession.currentSession(), entityPermission); 248 } 249 250 public GeoCode getCountryGeoCode(Session session) { 251 return getCountryGeoCode(session, EntityPermission.READ_ONLY); 252 } 253 254 public GeoCode getCountryGeoCode() { 255 return getCountryGeoCode(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 256 } 257 258 public GeoCode getCountryGeoCodeForUpdate(Session session) { 259 return getCountryGeoCode(session, EntityPermission.READ_WRITE); 260 } 261 262 public GeoCode getCountryGeoCodeForUpdate() { 263 return getCountryGeoCode(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 264 } 265 266 public void setCountryGeoCodePK(GeoCodePK countryGeoCodePK) 267 throws PersistenceNotNullException, PersistenceReadOnlyException { 268 checkReadWrite(); 269 _value.setCountryGeoCodePK(countryGeoCodePK); 270 } 271 272 public void setCountryGeoCode(GeoCode entity) { 273 setCountryGeoCodePK(entity == null? null: entity.getPrimaryKey()); 274 } 275 276 public boolean getCountryGeoCodePKHasBeenModified() { 277 return _value.getCountryGeoCodePKHasBeenModified(); 278 } 279 280 public HarmonizedTariffScheduleCodeUseTypePK getHarmonizedTariffScheduleCodeUseTypePK() { 281 return _value.getHarmonizedTariffScheduleCodeUseTypePK(); 282 } 283 284 public HarmonizedTariffScheduleCodeUseType getHarmonizedTariffScheduleCodeUseType(Session session, EntityPermission entityPermission) { 285 return HarmonizedTariffScheduleCodeUseTypeFactory.getInstance().getEntityFromPK(session, entityPermission, getHarmonizedTariffScheduleCodeUseTypePK()); 286 } 287 288 public HarmonizedTariffScheduleCodeUseType getHarmonizedTariffScheduleCodeUseType(EntityPermission entityPermission) { 289 return getHarmonizedTariffScheduleCodeUseType(ThreadSession.currentSession(), entityPermission); 290 } 291 292 public HarmonizedTariffScheduleCodeUseType getHarmonizedTariffScheduleCodeUseType(Session session) { 293 return getHarmonizedTariffScheduleCodeUseType(session, EntityPermission.READ_ONLY); 294 } 295 296 public HarmonizedTariffScheduleCodeUseType getHarmonizedTariffScheduleCodeUseType() { 297 return getHarmonizedTariffScheduleCodeUseType(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 298 } 299 300 public HarmonizedTariffScheduleCodeUseType getHarmonizedTariffScheduleCodeUseTypeForUpdate(Session session) { 301 return getHarmonizedTariffScheduleCodeUseType(session, EntityPermission.READ_WRITE); 302 } 303 304 public HarmonizedTariffScheduleCodeUseType getHarmonizedTariffScheduleCodeUseTypeForUpdate() { 305 return getHarmonizedTariffScheduleCodeUseType(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 306 } 307 308 public void setHarmonizedTariffScheduleCodeUseTypePK(HarmonizedTariffScheduleCodeUseTypePK harmonizedTariffScheduleCodeUseTypePK) 309 throws PersistenceNotNullException, PersistenceReadOnlyException { 310 checkReadWrite(); 311 _value.setHarmonizedTariffScheduleCodeUseTypePK(harmonizedTariffScheduleCodeUseTypePK); 312 } 313 314 public void setHarmonizedTariffScheduleCodeUseType(HarmonizedTariffScheduleCodeUseType entity) { 315 setHarmonizedTariffScheduleCodeUseTypePK(entity == null? null: entity.getPrimaryKey()); 316 } 317 318 public boolean getHarmonizedTariffScheduleCodeUseTypePKHasBeenModified() { 319 return _value.getHarmonizedTariffScheduleCodeUseTypePKHasBeenModified(); 320 } 321 322 public HarmonizedTariffScheduleCodePK getHarmonizedTariffScheduleCodePK() { 323 return _value.getHarmonizedTariffScheduleCodePK(); 324 } 325 326 public HarmonizedTariffScheduleCode getHarmonizedTariffScheduleCode(Session session, EntityPermission entityPermission) { 327 return HarmonizedTariffScheduleCodeFactory.getInstance().getEntityFromPK(session, entityPermission, getHarmonizedTariffScheduleCodePK()); 328 } 329 330 public HarmonizedTariffScheduleCode getHarmonizedTariffScheduleCode(EntityPermission entityPermission) { 331 return getHarmonizedTariffScheduleCode(ThreadSession.currentSession(), entityPermission); 332 } 333 334 public HarmonizedTariffScheduleCode getHarmonizedTariffScheduleCode(Session session) { 335 return getHarmonizedTariffScheduleCode(session, EntityPermission.READ_ONLY); 336 } 337 338 public HarmonizedTariffScheduleCode getHarmonizedTariffScheduleCode() { 339 return getHarmonizedTariffScheduleCode(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 340 } 341 342 public HarmonizedTariffScheduleCode getHarmonizedTariffScheduleCodeForUpdate(Session session) { 343 return getHarmonizedTariffScheduleCode(session, EntityPermission.READ_WRITE); 344 } 345 346 public HarmonizedTariffScheduleCode getHarmonizedTariffScheduleCodeForUpdate() { 347 return getHarmonizedTariffScheduleCode(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 348 } 349 350 public void setHarmonizedTariffScheduleCodePK(HarmonizedTariffScheduleCodePK harmonizedTariffScheduleCodePK) 351 throws PersistenceNotNullException, PersistenceReadOnlyException { 352 checkReadWrite(); 353 _value.setHarmonizedTariffScheduleCodePK(harmonizedTariffScheduleCodePK); 354 } 355 356 public void setHarmonizedTariffScheduleCode(HarmonizedTariffScheduleCode entity) { 357 setHarmonizedTariffScheduleCodePK(entity == null? null: entity.getPrimaryKey()); 358 } 359 360 public boolean getHarmonizedTariffScheduleCodePKHasBeenModified() { 361 return _value.getHarmonizedTariffScheduleCodePKHasBeenModified(); 362 } 363 364 public Long getFromTime() { 365 return _value.getFromTime(); 366 } 367 368 public void setFromTime(Long fromTime) 369 throws PersistenceNotNullException, PersistenceReadOnlyException { 370 checkReadWrite(); 371 _value.setFromTime(fromTime); 372 } 373 374 public boolean getFromTimeHasBeenModified() { 375 return _value.getFromTimeHasBeenModified(); 376 } 377 378 public Long getThruTime() { 379 return _value.getThruTime(); 380 } 381 382 public void setThruTime(Long thruTime) 383 throws PersistenceNotNullException, PersistenceReadOnlyException { 384 checkReadWrite(); 385 _value.setThruTime(thruTime); 386 } 387 388 public boolean getThruTimeHasBeenModified() { 389 return _value.getThruTimeHasBeenModified(); 390 } 391 392}