001    /**
002     * Copyright (c) 2000-2012 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            public OrgLabor toEntityModel() {
078                    OrgLaborImpl orgLaborImpl = new OrgLaborImpl();
079    
080                    orgLaborImpl.setOrgLaborId(orgLaborId);
081                    orgLaborImpl.setOrganizationId(organizationId);
082                    orgLaborImpl.setTypeId(typeId);
083                    orgLaborImpl.setSunOpen(sunOpen);
084                    orgLaborImpl.setSunClose(sunClose);
085                    orgLaborImpl.setMonOpen(monOpen);
086                    orgLaborImpl.setMonClose(monClose);
087                    orgLaborImpl.setTueOpen(tueOpen);
088                    orgLaborImpl.setTueClose(tueClose);
089                    orgLaborImpl.setWedOpen(wedOpen);
090                    orgLaborImpl.setWedClose(wedClose);
091                    orgLaborImpl.setThuOpen(thuOpen);
092                    orgLaborImpl.setThuClose(thuClose);
093                    orgLaborImpl.setFriOpen(friOpen);
094                    orgLaborImpl.setFriClose(friClose);
095                    orgLaborImpl.setSatOpen(satOpen);
096                    orgLaborImpl.setSatClose(satClose);
097    
098                    orgLaborImpl.resetOriginalValues();
099    
100                    return orgLaborImpl;
101            }
102    
103            public void readExternal(ObjectInput objectInput) throws IOException {
104                    orgLaborId = objectInput.readLong();
105                    organizationId = objectInput.readLong();
106                    typeId = objectInput.readInt();
107                    sunOpen = objectInput.readInt();
108                    sunClose = objectInput.readInt();
109                    monOpen = objectInput.readInt();
110                    monClose = objectInput.readInt();
111                    tueOpen = objectInput.readInt();
112                    tueClose = objectInput.readInt();
113                    wedOpen = objectInput.readInt();
114                    wedClose = objectInput.readInt();
115                    thuOpen = objectInput.readInt();
116                    thuClose = objectInput.readInt();
117                    friOpen = objectInput.readInt();
118                    friClose = objectInput.readInt();
119                    satOpen = objectInput.readInt();
120                    satClose = objectInput.readInt();
121            }
122    
123            public void writeExternal(ObjectOutput objectOutput)
124                    throws IOException {
125                    objectOutput.writeLong(orgLaborId);
126                    objectOutput.writeLong(organizationId);
127                    objectOutput.writeInt(typeId);
128                    objectOutput.writeInt(sunOpen);
129                    objectOutput.writeInt(sunClose);
130                    objectOutput.writeInt(monOpen);
131                    objectOutput.writeInt(monClose);
132                    objectOutput.writeInt(tueOpen);
133                    objectOutput.writeInt(tueClose);
134                    objectOutput.writeInt(wedOpen);
135                    objectOutput.writeInt(wedClose);
136                    objectOutput.writeInt(thuOpen);
137                    objectOutput.writeInt(thuClose);
138                    objectOutput.writeInt(friOpen);
139                    objectOutput.writeInt(friClose);
140                    objectOutput.writeInt(satOpen);
141                    objectOutput.writeInt(satClose);
142            }
143    
144            public long orgLaborId;
145            public long organizationId;
146            public int typeId;
147            public int sunOpen;
148            public int sunClose;
149            public int monOpen;
150            public int monClose;
151            public int tueOpen;
152            public int tueClose;
153            public int wedOpen;
154            public int wedClose;
155            public int thuOpen;
156            public int thuClose;
157            public int friOpen;
158            public int friClose;
159            public int satOpen;
160            public int satClose;
161    }