001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model.impl;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.StringBundler;
020    import com.liferay.portal.model.CacheModel;
021    import com.liferay.portal.model.MVCCModel;
022    import com.liferay.portal.model.OrgLabor;
023    
024    import java.io.Externalizable;
025    import java.io.IOException;
026    import java.io.ObjectInput;
027    import java.io.ObjectOutput;
028    
029    /**
030     * The cache model class for representing OrgLabor in entity cache.
031     *
032     * @author Brian Wing Shun Chan
033     * @see OrgLabor
034     * @generated
035     */
036    @ProviderType
037    public class OrgLaborCacheModel implements CacheModel<OrgLabor>, Externalizable,
038            MVCCModel {
039            @Override
040            public long getMvccVersion() {
041                    return mvccVersion;
042            }
043    
044            @Override
045            public void setMvccVersion(long mvccVersion) {
046                    this.mvccVersion = mvccVersion;
047            }
048    
049            @Override
050            public String toString() {
051                    StringBundler sb = new StringBundler(37);
052    
053                    sb.append("{mvccVersion=");
054                    sb.append(mvccVersion);
055                    sb.append(", orgLaborId=");
056                    sb.append(orgLaborId);
057                    sb.append(", organizationId=");
058                    sb.append(organizationId);
059                    sb.append(", typeId=");
060                    sb.append(typeId);
061                    sb.append(", sunOpen=");
062                    sb.append(sunOpen);
063                    sb.append(", sunClose=");
064                    sb.append(sunClose);
065                    sb.append(", monOpen=");
066                    sb.append(monOpen);
067                    sb.append(", monClose=");
068                    sb.append(monClose);
069                    sb.append(", tueOpen=");
070                    sb.append(tueOpen);
071                    sb.append(", tueClose=");
072                    sb.append(tueClose);
073                    sb.append(", wedOpen=");
074                    sb.append(wedOpen);
075                    sb.append(", wedClose=");
076                    sb.append(wedClose);
077                    sb.append(", thuOpen=");
078                    sb.append(thuOpen);
079                    sb.append(", thuClose=");
080                    sb.append(thuClose);
081                    sb.append(", friOpen=");
082                    sb.append(friOpen);
083                    sb.append(", friClose=");
084                    sb.append(friClose);
085                    sb.append(", satOpen=");
086                    sb.append(satOpen);
087                    sb.append(", satClose=");
088                    sb.append(satClose);
089                    sb.append("}");
090    
091                    return sb.toString();
092            }
093    
094            @Override
095            public OrgLabor toEntityModel() {
096                    OrgLaborImpl orgLaborImpl = new OrgLaborImpl();
097    
098                    orgLaborImpl.setMvccVersion(mvccVersion);
099                    orgLaborImpl.setOrgLaborId(orgLaborId);
100                    orgLaborImpl.setOrganizationId(organizationId);
101                    orgLaborImpl.setTypeId(typeId);
102                    orgLaborImpl.setSunOpen(sunOpen);
103                    orgLaborImpl.setSunClose(sunClose);
104                    orgLaborImpl.setMonOpen(monOpen);
105                    orgLaborImpl.setMonClose(monClose);
106                    orgLaborImpl.setTueOpen(tueOpen);
107                    orgLaborImpl.setTueClose(tueClose);
108                    orgLaborImpl.setWedOpen(wedOpen);
109                    orgLaborImpl.setWedClose(wedClose);
110                    orgLaborImpl.setThuOpen(thuOpen);
111                    orgLaborImpl.setThuClose(thuClose);
112                    orgLaborImpl.setFriOpen(friOpen);
113                    orgLaborImpl.setFriClose(friClose);
114                    orgLaborImpl.setSatOpen(satOpen);
115                    orgLaborImpl.setSatClose(satClose);
116    
117                    orgLaborImpl.resetOriginalValues();
118    
119                    return orgLaborImpl;
120            }
121    
122            @Override
123            public void readExternal(ObjectInput objectInput) throws IOException {
124                    mvccVersion = objectInput.readLong();
125                    orgLaborId = objectInput.readLong();
126                    organizationId = objectInput.readLong();
127                    typeId = objectInput.readInt();
128                    sunOpen = objectInput.readInt();
129                    sunClose = objectInput.readInt();
130                    monOpen = objectInput.readInt();
131                    monClose = objectInput.readInt();
132                    tueOpen = objectInput.readInt();
133                    tueClose = objectInput.readInt();
134                    wedOpen = objectInput.readInt();
135                    wedClose = objectInput.readInt();
136                    thuOpen = objectInput.readInt();
137                    thuClose = objectInput.readInt();
138                    friOpen = objectInput.readInt();
139                    friClose = objectInput.readInt();
140                    satOpen = objectInput.readInt();
141                    satClose = objectInput.readInt();
142            }
143    
144            @Override
145            public void writeExternal(ObjectOutput objectOutput)
146                    throws IOException {
147                    objectOutput.writeLong(mvccVersion);
148                    objectOutput.writeLong(orgLaborId);
149                    objectOutput.writeLong(organizationId);
150                    objectOutput.writeInt(typeId);
151                    objectOutput.writeInt(sunOpen);
152                    objectOutput.writeInt(sunClose);
153                    objectOutput.writeInt(monOpen);
154                    objectOutput.writeInt(monClose);
155                    objectOutput.writeInt(tueOpen);
156                    objectOutput.writeInt(tueClose);
157                    objectOutput.writeInt(wedOpen);
158                    objectOutput.writeInt(wedClose);
159                    objectOutput.writeInt(thuOpen);
160                    objectOutput.writeInt(thuClose);
161                    objectOutput.writeInt(friOpen);
162                    objectOutput.writeInt(friClose);
163                    objectOutput.writeInt(satOpen);
164                    objectOutput.writeInt(satClose);
165            }
166    
167            public long mvccVersion;
168            public long orgLaborId;
169            public long organizationId;
170            public int typeId;
171            public int sunOpen;
172            public int sunClose;
173            public int monOpen;
174            public int monClose;
175            public int tueOpen;
176            public int tueClose;
177            public int wedOpen;
178            public int wedClose;
179            public int thuOpen;
180            public int thuClose;
181            public int friOpen;
182            public int friClose;
183            public int satOpen;
184            public int satClose;
185    }