001// -------------------------------------------------------------------------------- 002// Copyright 2002-2024 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) { 114 ContentPageAreaDetail that = (ContentPageAreaDetail)other; 115 116 ContentPageAreaDetailValue thatValue = that.getContentPageAreaDetailValue(); 117 return _value.equals(thatValue); 118 } else { 119 return false; 120 } 121 } 122 123 @Override 124 public void store(Session session) 125 throws PersistenceDatabaseException { 126 getBaseFactoryInstance().store(session, this); 127 } 128 129 @Override 130 public void remove(Session session) 131 throws PersistenceDatabaseException { 132 getBaseFactoryInstance().remove(session, this); 133 } 134 135 @Override 136 public void remove() 137 throws PersistenceDatabaseException { 138 getBaseFactoryInstance().remove(ThreadSession.currentSession(), this); 139 } 140 141 public ContentPageAreaDetailValue getContentPageAreaDetailValue() { 142 return _value; 143 } 144 145 public void setContentPageAreaDetailValue(ContentPageAreaDetailValue value) 146 throws PersistenceReadOnlyException { 147 checkReadWrite(); 148 _value = value; 149 } 150 151 @Override 152 public ContentPageAreaDetailPK getPrimaryKey() { 153 return _pk; 154 } 155 156 public ContentPageAreaPK getContentPageAreaPK() { 157 return _value.getContentPageAreaPK(); 158 } 159 160 public ContentPageArea getContentPageArea(Session session, EntityPermission entityPermission) { 161 return ContentPageAreaFactory.getInstance().getEntityFromPK(session, entityPermission, getContentPageAreaPK()); 162 } 163 164 public ContentPageArea getContentPageArea(EntityPermission entityPermission) { 165 return getContentPageArea(ThreadSession.currentSession(), entityPermission); 166 } 167 168 public ContentPageArea getContentPageArea(Session session) { 169 return getContentPageArea(session, EntityPermission.READ_ONLY); 170 } 171 172 public ContentPageArea getContentPageArea() { 173 return getContentPageArea(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 174 } 175 176 public ContentPageArea getContentPageAreaForUpdate(Session session) { 177 return getContentPageArea(session, EntityPermission.READ_WRITE); 178 } 179 180 public ContentPageArea getContentPageAreaForUpdate() { 181 return getContentPageArea(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 182 } 183 184 public void setContentPageAreaPK(ContentPageAreaPK contentPageAreaPK) 185 throws PersistenceNotNullException, PersistenceReadOnlyException { 186 checkReadWrite(); 187 _value.setContentPageAreaPK(contentPageAreaPK); 188 } 189 190 public void setContentPageArea(ContentPageArea entity) { 191 setContentPageAreaPK(entity == null? null: entity.getPrimaryKey()); 192 } 193 194 public boolean getContentPageAreaPKHasBeenModified() { 195 return _value.getContentPageAreaPKHasBeenModified(); 196 } 197 198 public ContentPagePK getContentPagePK() { 199 return _value.getContentPagePK(); 200 } 201 202 public ContentPage getContentPage(Session session, EntityPermission entityPermission) { 203 return ContentPageFactory.getInstance().getEntityFromPK(session, entityPermission, getContentPagePK()); 204 } 205 206 public ContentPage getContentPage(EntityPermission entityPermission) { 207 return getContentPage(ThreadSession.currentSession(), entityPermission); 208 } 209 210 public ContentPage getContentPage(Session session) { 211 return getContentPage(session, EntityPermission.READ_ONLY); 212 } 213 214 public ContentPage getContentPage() { 215 return getContentPage(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 216 } 217 218 public ContentPage getContentPageForUpdate(Session session) { 219 return getContentPage(session, EntityPermission.READ_WRITE); 220 } 221 222 public ContentPage getContentPageForUpdate() { 223 return getContentPage(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 224 } 225 226 public void setContentPagePK(ContentPagePK contentPagePK) 227 throws PersistenceNotNullException, PersistenceReadOnlyException { 228 checkReadWrite(); 229 _value.setContentPagePK(contentPagePK); 230 } 231 232 public void setContentPage(ContentPage entity) { 233 setContentPagePK(entity == null? null: entity.getPrimaryKey()); 234 } 235 236 public boolean getContentPagePKHasBeenModified() { 237 return _value.getContentPagePKHasBeenModified(); 238 } 239 240 public ContentPageLayoutAreaPK getContentPageLayoutAreaPK() { 241 return _value.getContentPageLayoutAreaPK(); 242 } 243 244 public ContentPageLayoutArea getContentPageLayoutArea(Session session, EntityPermission entityPermission) { 245 return ContentPageLayoutAreaFactory.getInstance().getEntityFromPK(session, entityPermission, getContentPageLayoutAreaPK()); 246 } 247 248 public ContentPageLayoutArea getContentPageLayoutArea(EntityPermission entityPermission) { 249 return getContentPageLayoutArea(ThreadSession.currentSession(), entityPermission); 250 } 251 252 public ContentPageLayoutArea getContentPageLayoutArea(Session session) { 253 return getContentPageLayoutArea(session, EntityPermission.READ_ONLY); 254 } 255 256 public ContentPageLayoutArea getContentPageLayoutArea() { 257 return getContentPageLayoutArea(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 258 } 259 260 public ContentPageLayoutArea getContentPageLayoutAreaForUpdate(Session session) { 261 return getContentPageLayoutArea(session, EntityPermission.READ_WRITE); 262 } 263 264 public ContentPageLayoutArea getContentPageLayoutAreaForUpdate() { 265 return getContentPageLayoutArea(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 266 } 267 268 public void setContentPageLayoutAreaPK(ContentPageLayoutAreaPK contentPageLayoutAreaPK) 269 throws PersistenceNotNullException, PersistenceReadOnlyException { 270 checkReadWrite(); 271 _value.setContentPageLayoutAreaPK(contentPageLayoutAreaPK); 272 } 273 274 public void setContentPageLayoutArea(ContentPageLayoutArea entity) { 275 setContentPageLayoutAreaPK(entity == null? null: entity.getPrimaryKey()); 276 } 277 278 public boolean getContentPageLayoutAreaPKHasBeenModified() { 279 return _value.getContentPageLayoutAreaPKHasBeenModified(); 280 } 281 282 public LanguagePK getLanguagePK() { 283 return _value.getLanguagePK(); 284 } 285 286 public Language getLanguage(Session session, EntityPermission entityPermission) { 287 return LanguageFactory.getInstance().getEntityFromPK(session, entityPermission, getLanguagePK()); 288 } 289 290 public Language getLanguage(EntityPermission entityPermission) { 291 return getLanguage(ThreadSession.currentSession(), entityPermission); 292 } 293 294 public Language getLanguage(Session session) { 295 return getLanguage(session, EntityPermission.READ_ONLY); 296 } 297 298 public Language getLanguage() { 299 return getLanguage(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 300 } 301 302 public Language getLanguageForUpdate(Session session) { 303 return getLanguage(session, EntityPermission.READ_WRITE); 304 } 305 306 public Language getLanguageForUpdate() { 307 return getLanguage(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 308 } 309 310 public void setLanguagePK(LanguagePK languagePK) 311 throws PersistenceNotNullException, PersistenceReadOnlyException { 312 checkReadWrite(); 313 _value.setLanguagePK(languagePK); 314 } 315 316 public void setLanguage(Language entity) { 317 setLanguagePK(entity == null? null: entity.getPrimaryKey()); 318 } 319 320 public boolean getLanguagePKHasBeenModified() { 321 return _value.getLanguagePKHasBeenModified(); 322 } 323 324 public MimeTypePK getMimeTypePK() { 325 return _value.getMimeTypePK(); 326 } 327 328 public MimeType getMimeType(Session session, EntityPermission entityPermission) { 329 return MimeTypeFactory.getInstance().getEntityFromPK(session, entityPermission, getMimeTypePK()); 330 } 331 332 public MimeType getMimeType(EntityPermission entityPermission) { 333 return getMimeType(ThreadSession.currentSession(), entityPermission); 334 } 335 336 public MimeType getMimeType(Session session) { 337 return getMimeType(session, EntityPermission.READ_ONLY); 338 } 339 340 public MimeType getMimeType() { 341 return getMimeType(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 342 } 343 344 public MimeType getMimeTypeForUpdate(Session session) { 345 return getMimeType(session, EntityPermission.READ_WRITE); 346 } 347 348 public MimeType getMimeTypeForUpdate() { 349 return getMimeType(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 350 } 351 352 public void setMimeTypePK(MimeTypePK mimeTypePK) 353 throws PersistenceNotNullException, PersistenceReadOnlyException { 354 checkReadWrite(); 355 _value.setMimeTypePK(mimeTypePK); 356 } 357 358 public void setMimeType(MimeType entity) { 359 setMimeTypePK(entity == null? null: entity.getPrimaryKey()); 360 } 361 362 public boolean getMimeTypePKHasBeenModified() { 363 return _value.getMimeTypePKHasBeenModified(); 364 } 365 366 public Long getFromTime() { 367 return _value.getFromTime(); 368 } 369 370 public void setFromTime(Long fromTime) 371 throws PersistenceNotNullException, PersistenceReadOnlyException { 372 checkReadWrite(); 373 _value.setFromTime(fromTime); 374 } 375 376 public boolean getFromTimeHasBeenModified() { 377 return _value.getFromTimeHasBeenModified(); 378 } 379 380 public Long getThruTime() { 381 return _value.getThruTime(); 382 } 383 384 public void setThruTime(Long thruTime) 385 throws PersistenceNotNullException, PersistenceReadOnlyException { 386 checkReadWrite(); 387 _value.setThruTime(thruTime); 388 } 389 390 public boolean getThruTimeHasBeenModified() { 391 return _value.getThruTimeHasBeenModified(); 392 } 393 394}