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 * 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() 123 throws PersistenceDatabaseException { 124 getBaseFactoryInstance().store(this); 125 } 126 127 @Override 128 public void remove() 129 throws PersistenceDatabaseException { 130 getBaseFactoryInstance().remove(this); 131 } 132 133 public ContentPageAreaDetailValue getContentPageAreaDetailValue() { 134 return _value; 135 } 136 137 public void setContentPageAreaDetailValue(ContentPageAreaDetailValue value) 138 throws PersistenceReadOnlyException { 139 checkReadWrite(); 140 _value = value; 141 } 142 143 @Override 144 public ContentPageAreaDetailPK getPrimaryKey() { 145 return _pk; 146 } 147 148 public ContentPageAreaPK getContentPageAreaPK() { 149 return _value.getContentPageAreaPK(); 150 } 151 152 public ContentPageArea getContentPageArea(EntityPermission entityPermission) { 153 return ContentPageAreaFactory.getInstance().getEntityFromPK(entityPermission, getContentPageAreaPK()); 154 } 155 156 public ContentPageArea getContentPageArea() { 157 return getContentPageArea(EntityPermission.READ_ONLY); 158 } 159 160 public ContentPageArea getContentPageAreaForUpdate() { 161 return getContentPageArea(EntityPermission.READ_WRITE); 162 } 163 164 public void setContentPageAreaPK(ContentPageAreaPK contentPageAreaPK) 165 throws PersistenceNotNullException, PersistenceReadOnlyException { 166 checkReadWrite(); 167 _value.setContentPageAreaPK(contentPageAreaPK); 168 } 169 170 public void setContentPageArea(ContentPageArea entity) { 171 setContentPageAreaPK(entity == null? null: entity.getPrimaryKey()); 172 } 173 174 public boolean getContentPageAreaPKHasBeenModified() { 175 return _value.getContentPageAreaPKHasBeenModified(); 176 } 177 178 public ContentPagePK getContentPagePK() { 179 return _value.getContentPagePK(); 180 } 181 182 public ContentPage getContentPage(EntityPermission entityPermission) { 183 return ContentPageFactory.getInstance().getEntityFromPK(entityPermission, getContentPagePK()); 184 } 185 186 public ContentPage getContentPage() { 187 return getContentPage(EntityPermission.READ_ONLY); 188 } 189 190 public ContentPage getContentPageForUpdate() { 191 return getContentPage(EntityPermission.READ_WRITE); 192 } 193 194 public void setContentPagePK(ContentPagePK contentPagePK) 195 throws PersistenceNotNullException, PersistenceReadOnlyException { 196 checkReadWrite(); 197 _value.setContentPagePK(contentPagePK); 198 } 199 200 public void setContentPage(ContentPage entity) { 201 setContentPagePK(entity == null? null: entity.getPrimaryKey()); 202 } 203 204 public boolean getContentPagePKHasBeenModified() { 205 return _value.getContentPagePKHasBeenModified(); 206 } 207 208 public ContentPageLayoutAreaPK getContentPageLayoutAreaPK() { 209 return _value.getContentPageLayoutAreaPK(); 210 } 211 212 public ContentPageLayoutArea getContentPageLayoutArea(EntityPermission entityPermission) { 213 return ContentPageLayoutAreaFactory.getInstance().getEntityFromPK(entityPermission, getContentPageLayoutAreaPK()); 214 } 215 216 public ContentPageLayoutArea getContentPageLayoutArea() { 217 return getContentPageLayoutArea(EntityPermission.READ_ONLY); 218 } 219 220 public ContentPageLayoutArea getContentPageLayoutAreaForUpdate() { 221 return getContentPageLayoutArea(EntityPermission.READ_WRITE); 222 } 223 224 public void setContentPageLayoutAreaPK(ContentPageLayoutAreaPK contentPageLayoutAreaPK) 225 throws PersistenceNotNullException, PersistenceReadOnlyException { 226 checkReadWrite(); 227 _value.setContentPageLayoutAreaPK(contentPageLayoutAreaPK); 228 } 229 230 public void setContentPageLayoutArea(ContentPageLayoutArea entity) { 231 setContentPageLayoutAreaPK(entity == null? null: entity.getPrimaryKey()); 232 } 233 234 public boolean getContentPageLayoutAreaPKHasBeenModified() { 235 return _value.getContentPageLayoutAreaPKHasBeenModified(); 236 } 237 238 public LanguagePK getLanguagePK() { 239 return _value.getLanguagePK(); 240 } 241 242 public Language getLanguage(EntityPermission entityPermission) { 243 return LanguageFactory.getInstance().getEntityFromPK(entityPermission, getLanguagePK()); 244 } 245 246 public Language getLanguage() { 247 return getLanguage(EntityPermission.READ_ONLY); 248 } 249 250 public Language getLanguageForUpdate() { 251 return getLanguage(EntityPermission.READ_WRITE); 252 } 253 254 public void setLanguagePK(LanguagePK languagePK) 255 throws PersistenceNotNullException, PersistenceReadOnlyException { 256 checkReadWrite(); 257 _value.setLanguagePK(languagePK); 258 } 259 260 public void setLanguage(Language entity) { 261 setLanguagePK(entity == null? null: entity.getPrimaryKey()); 262 } 263 264 public boolean getLanguagePKHasBeenModified() { 265 return _value.getLanguagePKHasBeenModified(); 266 } 267 268 public MimeTypePK getMimeTypePK() { 269 return _value.getMimeTypePK(); 270 } 271 272 public MimeType getMimeType(EntityPermission entityPermission) { 273 return MimeTypeFactory.getInstance().getEntityFromPK(entityPermission, getMimeTypePK()); 274 } 275 276 public MimeType getMimeType() { 277 return getMimeType(EntityPermission.READ_ONLY); 278 } 279 280 public MimeType getMimeTypeForUpdate() { 281 return getMimeType(EntityPermission.READ_WRITE); 282 } 283 284 public void setMimeTypePK(MimeTypePK mimeTypePK) 285 throws PersistenceNotNullException, PersistenceReadOnlyException { 286 checkReadWrite(); 287 _value.setMimeTypePK(mimeTypePK); 288 } 289 290 public void setMimeType(MimeType entity) { 291 setMimeTypePK(entity == null? null: entity.getPrimaryKey()); 292 } 293 294 public boolean getMimeTypePKHasBeenModified() { 295 return _value.getMimeTypePKHasBeenModified(); 296 } 297 298 public Long getFromTime() { 299 return _value.getFromTime(); 300 } 301 302 public void setFromTime(Long fromTime) 303 throws PersistenceNotNullException, PersistenceReadOnlyException { 304 checkReadWrite(); 305 _value.setFromTime(fromTime); 306 } 307 308 public boolean getFromTimeHasBeenModified() { 309 return _value.getFromTimeHasBeenModified(); 310 } 311 312 public Long getThruTime() { 313 return _value.getThruTime(); 314 } 315 316 public void setThruTime(Long thruTime) 317 throws PersistenceNotNullException, PersistenceReadOnlyException { 318 checkReadWrite(); 319 _value.setThruTime(thruTime); 320 } 321 322 public boolean getThruTimeHasBeenModified() { 323 return _value.getThruTimeHasBeenModified(); 324 } 325 326}