@ProviderType public interface CountryPersistence extends BasePersistence<Country>
Caching information and settings can be found in portal.properties
CountryPersistenceImpl
,
CountryUtil
Modifier and Type | Method and Description |
---|---|
void |
cacheResult(Country country)
Caches the country in the entity cache if it is enabled.
|
void |
cacheResult(List<Country> countries)
Caches the countries in the entity cache if it is enabled.
|
int |
countAll()
Returns the number of countries.
|
int |
countByA2(String a2)
Returns the number of countries where a2 = ?.
|
int |
countByA3(String a3)
Returns the number of countries where a3 = ?.
|
int |
countByActive(boolean active)
Returns the number of countries where active = ?.
|
int |
countByName(String name)
Returns the number of countries where name = ?.
|
Country |
create(long countryId)
Creates a new country with the primary key.
|
Country |
fetchByA2(String a2)
Returns the country where a2 = ? or returns
null if it could not be found. |
Country |
fetchByA2(String a2,
boolean retrieveFromCache)
Returns the country where a2 = ? or returns
null if it could not be found, optionally using the finder cache. |
Country |
fetchByA3(String a3)
Returns the country where a3 = ? or returns
null if it could not be found. |
Country |
fetchByA3(String a3,
boolean retrieveFromCache)
Returns the country where a3 = ? or returns
null if it could not be found, optionally using the finder cache. |
Country |
fetchByActive_First(boolean active,
OrderByComparator<Country> orderByComparator)
Returns the first country in the ordered set where active = ?.
|
Country |
fetchByActive_Last(boolean active,
OrderByComparator<Country> orderByComparator)
Returns the last country in the ordered set where active = ?.
|
Country |
fetchByName(String name)
Returns the country where name = ? or returns
null if it could not be found. |
Country |
fetchByName(String name,
boolean retrieveFromCache)
Returns the country where name = ? or returns
null if it could not be found, optionally using the finder cache. |
Country |
fetchByPrimaryKey(long countryId)
Returns the country with the primary key or returns
null if it could not be found. |
Map<Serializable,Country> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys) |
List<Country> |
findAll()
Returns all the countries.
|
List<Country> |
findAll(int start,
int end)
Returns a range of all the countries.
|
List<Country> |
findAll(int start,
int end,
OrderByComparator<Country> orderByComparator)
Returns an ordered range of all the countries.
|
List<Country> |
findAll(int start,
int end,
OrderByComparator<Country> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the countries.
|
Country |
findByA2(String a2)
Returns the country where a2 = ? or throws a
NoSuchCountryException if it could not be found. |
Country |
findByA3(String a3)
Returns the country where a3 = ? or throws a
NoSuchCountryException if it could not be found. |
Country |
findByActive_First(boolean active,
OrderByComparator<Country> orderByComparator)
Returns the first country in the ordered set where active = ?.
|
Country |
findByActive_Last(boolean active,
OrderByComparator<Country> orderByComparator)
Returns the last country in the ordered set where active = ?.
|
Country[] |
findByActive_PrevAndNext(long countryId,
boolean active,
OrderByComparator<Country> orderByComparator)
Returns the countries before and after the current country in the ordered set where active = ?.
|
List<Country> |
findByActive(boolean active)
Returns all the countries where active = ?.
|
List<Country> |
findByActive(boolean active,
int start,
int end)
Returns a range of all the countries where active = ?.
|
List<Country> |
findByActive(boolean active,
int start,
int end,
OrderByComparator<Country> orderByComparator)
Returns an ordered range of all the countries where active = ?.
|
List<Country> |
findByActive(boolean active,
int start,
int end,
OrderByComparator<Country> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the countries where active = ?.
|
Country |
findByName(String name)
Returns the country where name = ? or throws a
NoSuchCountryException if it could not be found. |
Country |
findByPrimaryKey(long countryId)
Returns the country with the primary key or throws a
NoSuchCountryException if it could not be found. |
Set<String> |
getBadColumnNames() |
Country |
remove(long countryId)
Removes the country with the primary key from the database.
|
void |
removeAll()
Removes all the countries from the database.
|
Country |
removeByA2(String a2)
Removes the country where a2 = ? from the database.
|
Country |
removeByA3(String a3)
Removes the country where a3 = ? from the database.
|
void |
removeByActive(boolean active)
Removes all the countries where active = ? from the database.
|
Country |
removeByName(String name)
Removes the country where name = ? from the database.
|
Country |
updateImpl(Country country) |
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update
Country findByName(String name) throws NoSuchCountryException
NoSuchCountryException
if it could not be found.name
- the nameNoSuchCountryException
- if a matching country could not be foundCountry fetchByName(String name)
null
if it could not be found. Uses the finder cache.name
- the namenull
if a matching country could not be foundCountry fetchByName(String name, boolean retrieveFromCache)
null
if it could not be found, optionally using the finder cache.name
- the nameretrieveFromCache
- whether to retrieve from the finder cachenull
if a matching country could not be foundCountry removeByName(String name) throws NoSuchCountryException
name
- the nameNoSuchCountryException
int countByName(String name)
name
- the nameCountry findByA2(String a2) throws NoSuchCountryException
NoSuchCountryException
if it could not be found.a2
- the a2NoSuchCountryException
- if a matching country could not be foundCountry fetchByA2(String a2)
null
if it could not be found. Uses the finder cache.a2
- the a2null
if a matching country could not be foundCountry fetchByA2(String a2, boolean retrieveFromCache)
null
if it could not be found, optionally using the finder cache.a2
- the a2retrieveFromCache
- whether to retrieve from the finder cachenull
if a matching country could not be foundCountry removeByA2(String a2) throws NoSuchCountryException
a2
- the a2NoSuchCountryException
int countByA2(String a2)
a2
- the a2Country findByA3(String a3) throws NoSuchCountryException
NoSuchCountryException
if it could not be found.a3
- the a3NoSuchCountryException
- if a matching country could not be foundCountry fetchByA3(String a3)
null
if it could not be found. Uses the finder cache.a3
- the a3null
if a matching country could not be foundCountry fetchByA3(String a3, boolean retrieveFromCache)
null
if it could not be found, optionally using the finder cache.a3
- the a3retrieveFromCache
- whether to retrieve from the finder cachenull
if a matching country could not be foundCountry removeByA3(String a3) throws NoSuchCountryException
a3
- the a3NoSuchCountryException
int countByA3(String a3)
a3
- the a3List<Country> findByActive(boolean active)
active
- the activeList<Country> findByActive(boolean active, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from CountryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
active
- the activestart
- the lower bound of the range of countriesend
- the upper bound of the range of countries (not inclusive)List<Country> findByActive(boolean active, int start, int end, OrderByComparator<Country> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from CountryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
active
- the activestart
- the lower bound of the range of countriesend
- the upper bound of the range of countries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)List<Country> findByActive(boolean active, int start, int end, OrderByComparator<Country> orderByComparator, boolean retrieveFromCache)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from CountryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
active
- the activestart
- the lower bound of the range of countriesend
- the upper bound of the range of countries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cacheCountry findByActive_First(boolean active, OrderByComparator<Country> orderByComparator) throws NoSuchCountryException
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCountryException
- if a matching country could not be foundCountry fetchByActive_First(boolean active, OrderByComparator<Country> orderByComparator)
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching country could not be foundCountry findByActive_Last(boolean active, OrderByComparator<Country> orderByComparator) throws NoSuchCountryException
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCountryException
- if a matching country could not be foundCountry fetchByActive_Last(boolean active, OrderByComparator<Country> orderByComparator)
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching country could not be foundCountry[] findByActive_PrevAndNext(long countryId, boolean active, OrderByComparator<Country> orderByComparator) throws NoSuchCountryException
countryId
- the primary key of the current countryactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCountryException
- if a country with the primary key could not be foundvoid removeByActive(boolean active)
active
- the activeint countByActive(boolean active)
active
- the activevoid cacheResult(Country country)
country
- the countryvoid cacheResult(List<Country> countries)
countries
- the countriesCountry create(long countryId)
countryId
- the primary key for the new countryCountry remove(long countryId) throws NoSuchCountryException
countryId
- the primary key of the countryNoSuchCountryException
- if a country with the primary key could not be foundCountry findByPrimaryKey(long countryId) throws NoSuchCountryException
NoSuchCountryException
if it could not be found.countryId
- the primary key of the countryNoSuchCountryException
- if a country with the primary key could not be foundCountry fetchByPrimaryKey(long countryId)
null
if it could not be found.countryId
- the primary key of the countrynull
if a country with the primary key could not be foundMap<Serializable,Country> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
fetchByPrimaryKeys
in interface BasePersistence<Country>
List<Country> findAll()
List<Country> findAll(int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from CountryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of countriesend
- the upper bound of the range of countries (not inclusive)List<Country> findAll(int start, int end, OrderByComparator<Country> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from CountryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of countriesend
- the upper bound of the range of countries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)List<Country> findAll(int start, int end, OrderByComparator<Country> orderByComparator, boolean retrieveFromCache)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from CountryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of countriesend
- the upper bound of the range of countries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachevoid removeAll()
int countAll()
Set<String> getBadColumnNames()
getBadColumnNames
in interface BasePersistence<Country>