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 * ContentPageAreaDetail.java 021 */ 022 023package com.echothree.model.data.content.server.entity; 024 025import com.echothree.model.data.content.common.pk.ContentPageAreaDetailPK; 026 027import com.echothree.model.data.content.common.pk.ContentPageAreaPK; 028import com.echothree.model.data.content.common.pk.ContentPagePK; 029import com.echothree.model.data.content.common.pk.ContentPageLayoutAreaPK; 030import com.echothree.model.data.party.common.pk.LanguagePK; 031import com.echothree.model.data.core.common.pk.MimeTypePK; 032 033import com.echothree.model.data.content.server.entity.ContentPageArea; 034import com.echothree.model.data.content.server.entity.ContentPage; 035import com.echothree.model.data.content.server.entity.ContentPageLayoutArea; 036import com.echothree.model.data.party.server.entity.Language; 037import com.echothree.model.data.core.server.entity.MimeType; 038 039import com.echothree.model.data.content.server.factory.ContentPageAreaFactory; 040import com.echothree.model.data.content.server.factory.ContentPageFactory; 041import com.echothree.model.data.content.server.factory.ContentPageLayoutAreaFactory; 042import com.echothree.model.data.party.server.factory.LanguageFactory; 043import com.echothree.model.data.core.server.factory.MimeTypeFactory; 044 045import com.echothree.model.data.content.common.pk.ContentPageAreaDetailPK; 046 047import com.echothree.model.data.content.server.value.ContentPageAreaDetailValue; 048 049import com.echothree.model.data.content.server.factory.ContentPageAreaDetailFactory; 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 ContentPageAreaDetail 068 extends BaseEntity 069 implements Serializable { 070 071 private ContentPageAreaDetailPK _pk; 072 private ContentPageAreaDetailValue _value; 073 074 /** Creates a new instance of ContentPageAreaDetail */ 075 public ContentPageAreaDetail() 076 throws PersistenceException { 077 super(); 078 } 079 080 /** Creates a new instance of ContentPageAreaDetail */ 081 public ContentPageAreaDetail(ContentPageAreaDetailValue value, EntityPermission entityPermission) { 082 super(entityPermission); 083 084 _value = value; 085 _pk = value.getPrimaryKey(); 086 } 087 088 @Override 089 public ContentPageAreaDetailFactory getBaseFactoryInstance() { 090 return ContentPageAreaDetailFactory.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 ContentPageAreaDetail that) { 114 ContentPageAreaDetailValue thatValue = that.getContentPageAreaDetailValue(); 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 ContentPageAreaDetailValue getContentPageAreaDetailValue() { 140 return _value; 141 } 142 143 public void setContentPageAreaDetailValue(ContentPageAreaDetailValue value) 144 throws PersistenceReadOnlyException { 145 checkReadWrite(); 146 _value = value; 147 } 148 149 @Override 150 public ContentPageAreaDetailPK getPrimaryKey() { 151 return _pk; 152 } 153 154 public ContentPageAreaPK getContentPageAreaPK() { 155 return _value.getContentPageAreaPK(); 156 } 157 158 public ContentPageArea getContentPageArea(Session session, EntityPermission entityPermission) { 159 return ContentPageAreaFactory.getInstance().getEntityFromPK(session, entityPermission, getContentPageAreaPK()); 160 } 161 162 public ContentPageArea getContentPageArea(EntityPermission entityPermission) { 163 return getContentPageArea(ThreadSession.currentSession(), entityPermission); 164 } 165 166 public ContentPageArea getContentPageArea(Session session) { 167 return getContentPageArea(session, EntityPermission.READ_ONLY); 168 } 169 170 public ContentPageArea getContentPageArea() { 171 return getContentPageArea(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 172 } 173 174 public ContentPageArea getContentPageAreaForUpdate(Session session) { 175 return getContentPageArea(session, EntityPermission.READ_WRITE); 176 } 177 178 public ContentPageArea getContentPageAreaForUpdate() { 179 return getContentPageArea(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 180 } 181 182 public void setContentPageAreaPK(ContentPageAreaPK contentPageAreaPK) 183 throws PersistenceNotNullException, PersistenceReadOnlyException { 184 checkReadWrite(); 185 _value.setContentPageAreaPK(contentPageAreaPK); 186 } 187 188 public void setContentPageArea(ContentPageArea entity) { 189 setContentPageAreaPK(entity == null? null: entity.getPrimaryKey()); 190 } 191 192 public boolean getContentPageAreaPKHasBeenModified() { 193 return _value.getContentPageAreaPKHasBeenModified(); 194 } 195 196 public ContentPagePK getContentPagePK() { 197 return _value.getContentPagePK(); 198 } 199 200 public ContentPage getContentPage(Session session, EntityPermission entityPermission) { 201 return ContentPageFactory.getInstance().getEntityFromPK(session, entityPermission, getContentPagePK()); 202 } 203 204 public ContentPage getContentPage(EntityPermission entityPermission) { 205 return getContentPage(ThreadSession.currentSession(), entityPermission); 206 } 207 208 public ContentPage getContentPage(Session session) { 209 return getContentPage(session, EntityPermission.READ_ONLY); 210 } 211 212 public ContentPage getContentPage() { 213 return getContentPage(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 214 } 215 216 public ContentPage getContentPageForUpdate(Session session) { 217 return getContentPage(session, EntityPermission.READ_WRITE); 218 } 219 220 public ContentPage getContentPageForUpdate() { 221 return getContentPage(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 222 } 223 224 public void setContentPagePK(ContentPagePK contentPagePK) 225 throws PersistenceNotNullException, PersistenceReadOnlyException { 226 checkReadWrite(); 227 _value.setContentPagePK(contentPagePK); 228 } 229 230 public void setContentPage(ContentPage entity) { 231 setContentPagePK(entity == null? null: entity.getPrimaryKey()); 232 } 233 234 public boolean getContentPagePKHasBeenModified() { 235 return _value.getContentPagePKHasBeenModified(); 236 } 237 238 public ContentPageLayoutAreaPK getContentPageLayoutAreaPK() { 239 return _value.getContentPageLayoutAreaPK(); 240 } 241 242 public ContentPageLayoutArea getContentPageLayoutArea(Session session, EntityPermission entityPermission) { 243 return ContentPageLayoutAreaFactory.getInstance().getEntityFromPK(session, entityPermission, getContentPageLayoutAreaPK()); 244 } 245 246 public ContentPageLayoutArea getContentPageLayoutArea(EntityPermission entityPermission) { 247 return getContentPageLayoutArea(ThreadSession.currentSession(), entityPermission); 248 } 249 250 public ContentPageLayoutArea getContentPageLayoutArea(Session session) { 251 return getContentPageLayoutArea(session, EntityPermission.READ_ONLY); 252 } 253 254 public ContentPageLayoutArea getContentPageLayoutArea() { 255 return getContentPageLayoutArea(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 256 } 257 258 public ContentPageLayoutArea getContentPageLayoutAreaForUpdate(Session session) { 259 return getContentPageLayoutArea(session, EntityPermission.READ_WRITE); 260 } 261 262 public ContentPageLayoutArea getContentPageLayoutAreaForUpdate() { 263 return getContentPageLayoutArea(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 264 } 265 266 public void setContentPageLayoutAreaPK(ContentPageLayoutAreaPK contentPageLayoutAreaPK) 267 throws PersistenceNotNullException, PersistenceReadOnlyException { 268 checkReadWrite(); 269 _value.setContentPageLayoutAreaPK(contentPageLayoutAreaPK); 270 } 271 272 public void setContentPageLayoutArea(ContentPageLayoutArea entity) { 273 setContentPageLayoutAreaPK(entity == null? null: entity.getPrimaryKey()); 274 } 275 276 public boolean getContentPageLayoutAreaPKHasBeenModified() { 277 return _value.getContentPageLayoutAreaPKHasBeenModified(); 278 } 279 280 public LanguagePK getLanguagePK() { 281 return _value.getLanguagePK(); 282 } 283 284 public Language getLanguage(Session session, EntityPermission entityPermission) { 285 return LanguageFactory.getInstance().getEntityFromPK(session, entityPermission, getLanguagePK()); 286 } 287 288 public Language getLanguage(EntityPermission entityPermission) { 289 return getLanguage(ThreadSession.currentSession(), entityPermission); 290 } 291 292 public Language getLanguage(Session session) { 293 return getLanguage(session, EntityPermission.READ_ONLY); 294 } 295 296 public Language getLanguage() { 297 return getLanguage(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 298 } 299 300 public Language getLanguageForUpdate(Session session) { 301 return getLanguage(session, EntityPermission.READ_WRITE); 302 } 303 304 public Language getLanguageForUpdate() { 305 return getLanguage(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 306 } 307 308 public void setLanguagePK(LanguagePK languagePK) 309 throws PersistenceNotNullException, PersistenceReadOnlyException { 310 checkReadWrite(); 311 _value.setLanguagePK(languagePK); 312 } 313 314 public void setLanguage(Language entity) { 315 setLanguagePK(entity == null? null: entity.getPrimaryKey()); 316 } 317 318 public boolean getLanguagePKHasBeenModified() { 319 return _value.getLanguagePKHasBeenModified(); 320 } 321 322 public MimeTypePK getMimeTypePK() { 323 return _value.getMimeTypePK(); 324 } 325 326 public MimeType getMimeType(Session session, EntityPermission entityPermission) { 327 return MimeTypeFactory.getInstance().getEntityFromPK(session, entityPermission, getMimeTypePK()); 328 } 329 330 public MimeType getMimeType(EntityPermission entityPermission) { 331 return getMimeType(ThreadSession.currentSession(), entityPermission); 332 } 333 334 public MimeType getMimeType(Session session) { 335 return getMimeType(session, EntityPermission.READ_ONLY); 336 } 337 338 public MimeType getMimeType() { 339 return getMimeType(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 340 } 341 342 public MimeType getMimeTypeForUpdate(Session session) { 343 return getMimeType(session, EntityPermission.READ_WRITE); 344 } 345 346 public MimeType getMimeTypeForUpdate() { 347 return getMimeType(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 348 } 349 350 public void setMimeTypePK(MimeTypePK mimeTypePK) 351 throws PersistenceNotNullException, PersistenceReadOnlyException { 352 checkReadWrite(); 353 _value.setMimeTypePK(mimeTypePK); 354 } 355 356 public void setMimeType(MimeType entity) { 357 setMimeTypePK(entity == null? null: entity.getPrimaryKey()); 358 } 359 360 public boolean getMimeTypePKHasBeenModified() { 361 return _value.getMimeTypePKHasBeenModified(); 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}