Package br.com.thiagomoreira.liferay.plugins.notfound.services.model

Examples of br.com.thiagomoreira.liferay.plugins.notfound.services.model.NotFound


    Date now = new Date();
    long classNameId = classNameLocalService.getClassNameId(className);

    long notfoundId = counterLocalService.increment(NotFound.class.getName());

    NotFound notFound = notFoundPersistence.create(notfoundId);

    notFound.setCompanyId(serviceContext.getCompanyId());
    notFound.setGroupId(serviceContext.getScopeGroupId());
    notFound.setUserId(userId);
    notFound.setCreateDate(now);

    notFound.setClassNameId(classNameId);
    notFound.setKeywords(keywords);

    notFoundPersistence.update(notFound);

    return notFound;
  }
View Full Code Here


        if (!(obj instanceof NotFound)) {
            return false;
        }

        NotFound notFound = (NotFound) obj;

        long primaryKey = notFound.getPrimaryKey();

        if (getPrimaryKey() == primaryKey) {
            return true;
        } else {
            return false;
View Full Code Here

     * @param notFoundId the primary key for the new not found
     * @return the new not found
     */
    @Override
    public NotFound create(long notFoundId) {
        NotFound notFound = new NotFoundImpl();

        notFound.setNew(true);
        notFound.setPrimaryKey(notFoundId);

        return notFound;
    }
View Full Code Here

        Session session = null;

        try {
            session = openSession();

            NotFound notFound = (NotFound) session.get(NotFoundImpl.class,
                    primaryKey);

            if (notFound == null) {
                if (_log.isWarnEnabled()) {
                    _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public NotFound findByPrimaryKey(Serializable primaryKey)
        throws NoSuchNotFoundException, SystemException {
        NotFound notFound = fetchByPrimaryKey(primaryKey);

        if (notFound == null) {
            if (_log.isWarnEnabled()) {
                _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
            }
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public NotFound fetchByPrimaryKey(Serializable primaryKey)
        throws SystemException {
        NotFound notFound = (NotFound) EntityCacheUtil.getResult(NotFoundModelImpl.ENTITY_CACHE_ENABLED,
                NotFoundImpl.class, primaryKey);

        if (notFound == _nullNotFound) {
            return null;
        }
View Full Code Here

TOP

Related Classes of br.com.thiagomoreira.liferay.plugins.notfound.services.model.NotFound

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.