001    /**
002     * Copyright (c) 2000-2013 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 com.liferay.portal.kernel.util.StringBundler;
018    import com.liferay.portal.model.CacheModel;
019    import com.liferay.portal.model.OrgLabor;
020    
021    import java.io.Externalizable;
022    import java.io.IOException;
023    import java.io.ObjectInput;
024    import java.io.ObjectOutput;
025    
026    /**
027     * The cache model class for representing OrgLabor in entity cache.
028     *
029     * @author Brian Wing Shun Chan
030     * @see OrgLabor
031     * @generated
032     */
033    public class OrgLaborCacheModel implements CacheModel<OrgLabor>, Externalizable {
034            @Override
035            public String toString() {
036                    StringBundler sb = new StringBundler(35);
037    
038                    sb.append("{orgLaborId=");
039                    sb.append(orgLaborId);
040                    sb.append(", organizationId=");
041                    sb.append(organizationId);
042                    sb.append(", typeId=");
043                    sb.append(typeId);
044                    sb.append(", sunOpen=");
045                    sb.append(sunOpen);
046                    sb.append(", sunClose=");
047                    sb.append(sunClose);
048                    sb.append(", monOpen=");
049                    sb.append(monOpen);
050                    sb.append(", monClose=");
051                    sb.append(monClose);
052                    sb.append(", tueOpen=");
053                    sb.append(tueOpen);
054                    sb.append(", tueClose=");
055                    sb.append(tueClose);
056                    sb.append(", wedOpen=");
057                    sb.append(wedOpen);
058                    sb.append(", wedClose=");
059                    sb.append(wedClose);
060                    sb.append(", thuOpen=");
061                    sb.append(thuOpen);
062                    sb.append(", thuClose=");
063                    sb.append(thuClose);
064                    sb.append(", friOpen=");
065                    sb.append(friOpen);
066                    sb.append(", friClose=");
067                    sb.append(friClose);
068                    sb.append(", satOpen=");
069                    sb.append(satOpen);
070                    sb.append(", satClose=");
071                    sb.append(satClose);
072                    sb.append("}");
073    
074                    return sb.toString();
075            }
076    
077            @Override
078            public OrgLabor toEntityModel() {
079                    OrgLaborImpl orgLaborImpl = new OrgLaborImpl();
080    
081                    orgLaborImpl.setOrgLaborId(orgLaborId);
082                    orgLaborImpl.setOrganizationId(organizationId);
083                    orgLaborImpl.setTypeId(typeId);
084                    orgLaborImpl.setSunOpen(sunOpen);
085                    orgLaborImpl.setSunClose(sunClose);
086                    orgLaborImpl.setMonOpen(monOpen);
087                    orgLaborImpl.setMonClose(monClose);
088                    orgLaborImpl.setTueOpen(tueOpen);
089                    orgLaborImpl.setTueClose(tueClose);
090                    orgLaborImpl.setWedOpen(wedOpen);
091                    orgLaborImpl.setWedClose(wedClose);
092                    orgLaborImpl.setThuOpen(thuOpen);
093                    orgLaborImpl.setThuClose(thuClose);
094                    orgLaborImpl.setFriOpen(friOpen);
095                    orgLaborImpl.setFriClose(friClose);
096                    orgLaborImpl.setSatOpen(satOpen);
097                    orgLaborImpl.setSatClose(satClose);
098    
099                    orgLaborImpl.resetOriginalValues();
100    
101                    return orgLaborImpl;
102            }
103    
104            @Override
105            public void readExternal(ObjectInput objectInput) throws IOException {
106                    orgLaborId = objectInput.readLong();
107                    organizationId = objectInput.readLong();
108                    typeId = objectInput.readInt();
109                    sunOpen = objectInput.readInt();
110                    sunClose = objectInput.readInt();
111                    monOpen = objectInput.readInt();
112                    monClose = objectInput.readInt();
113                    tueOpen = objectInput.readInt();
114                    tueClose = objectInput.readInt();
115                    wedOpen = objectInput.readInt();
116                    wedClose = objectInput.readInt();
117                    thuOpen = objectInput.readInt();
118                    thuClose = objectInput.readInt();
119                    friOpen = objectInput.readInt();
120                    friClose = objectInput.readInt();
121                    satOpen = objectInput.readInt();
122                    satClose = objectInput.readInt();
123            }
124    
125            @Override
126            public void writeExternal(ObjectOutput objectOutput)
127                    throws IOException {
128                    objectOutput.writeLong(orgLaborId);
129                    objectOutput.writeLong(organizationId);
130                    objectOutput.writeInt(typeId);
131                    objectOutput.writeInt(sunOpen);
132                    objectOutput.writeInt(sunClose);
133                    objectOutput.writeInt(monOpen);
134                    objectOutput.writeInt(monClose);
135                    objectOutput.writeInt(tueOpen);
136                    objectOutput.writeInt(tueClose);
137                    objectOutput.writeInt(wedOpen);
138                    objectOutput.writeInt(wedClose);
139                    objectOutput.writeInt(thuOpen);
140                    objectOutput.writeInt(thuClose);
141                    objectOutput.writeInt(friOpen);
142                    objectOutput.writeInt(friClose);
143                    objectOutput.writeInt(satOpen);
144                    objectOutput.writeInt(satClose);
145            }
146    
147            public long orgLaborId;
148            public long organizationId;
149            public int typeId;
150            public int sunOpen;
151            public int sunClose;
152            public int monOpen;
153            public int monClose;
154            public int tueOpen;
155            public int tueClose;
156            public int wedOpen;
157            public int wedClose;
158            public int thuOpen;
159            public int thuClose;
160            public int friOpen;
161            public int friClose;
162            public int satOpen;
163            public int satClose;
164    }