001 /** 002 * Copyright (c) 2000-2010 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.counter.model; 016 017 import com.liferay.portal.kernel.annotation.AutoEscape; 018 import com.liferay.portal.model.BaseModel; 019 import com.liferay.portal.service.ServiceContext; 020 021 import com.liferay.portlet.expando.model.ExpandoBridge; 022 023 import java.io.Serializable; 024 025 /** 026 * The base model interface for the Counter service. Represents a row in the "Counter" database table, with each column mapped to a property of this class. 027 * 028 * <p> 029 * This interface and its corresponding implementation {@link com.liferay.counter.model.impl.CounterModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.counter.model.impl.CounterImpl}. 030 * </p> 031 * 032 * <p> 033 * Never modify or reference this interface directly. All methods that expect a counter model instance should use the {@link Counter} interface instead. 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see Counter 038 * @see com.liferay.counter.model.impl.CounterImpl 039 * @see com.liferay.counter.model.impl.CounterModelImpl 040 * @generated 041 */ 042 public interface CounterModel extends BaseModel<Counter> { 043 /** 044 * Gets the primary key of this counter. 045 * 046 * @return the primary key of this counter 047 */ 048 public String getPrimaryKey(); 049 050 /** 051 * Sets the primary key of this counter 052 * 053 * @param pk the primary key of this counter 054 */ 055 public void setPrimaryKey(String pk); 056 057 /** 058 * Gets the name of this counter. 059 * 060 * @return the name of this counter 061 */ 062 @AutoEscape 063 public String getName(); 064 065 /** 066 * Sets the name of this counter. 067 * 068 * @param name the name of this counter 069 */ 070 public void setName(String name); 071 072 /** 073 * Gets the current id of this counter. 074 * 075 * @return the current id of this counter 076 */ 077 public long getCurrentId(); 078 079 /** 080 * Sets the current id of this counter. 081 * 082 * @param currentId the current id of this counter 083 */ 084 public void setCurrentId(long currentId); 085 086 /** 087 * Gets a copy of this counter as an escaped model instance by wrapping it with an {@link com.liferay.portal.kernel.bean.AutoEscapeBeanHandler}. 088 * 089 * @return the escaped model instance 090 * @see com.liferay.portal.kernel.bean.AutoEscapeBeanHandler 091 */ 092 public Counter toEscapedModel(); 093 094 public boolean isNew(); 095 096 public void setNew(boolean n); 097 098 public boolean isCachedModel(); 099 100 public void setCachedModel(boolean cachedModel); 101 102 public boolean isEscapedModel(); 103 104 public void setEscapedModel(boolean escapedModel); 105 106 public Serializable getPrimaryKeyObj(); 107 108 public ExpandoBridge getExpandoBridge(); 109 110 public void setExpandoBridgeAttributes(ServiceContext serviceContext); 111 112 public Object clone(); 113 114 public int compareTo(Counter counter); 115 116 public int hashCode(); 117 118 public String toString(); 119 120 public String toXmlString(); 121 }