import javax.ejb.EJB;
import javax.ejb.Stateless;
import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
-import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataAlreadyAddedException;
+import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicCompanyDataAlreadyAddedException;
import org.mxchange.jcontactsbusiness.model.employee.Employee;
import org.mxchange.jusercore.model.user.User;
}
@Override
- public BusinessBasicData addCompanyBasicData (final BusinessBasicData basicData) throws BusinessDataAlreadyAddedException {
+ public BusinessBasicData addCompanyBasicData (final BusinessBasicData basicData) throws BasicCompanyDataAlreadyAddedException {
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addBusinessBasicData: basicData={1} - CALLED!", this.getClass().getSimpleName(), basicData)); //NOI18N
throw new IllegalArgumentException(MessageFormat.format("basicData.basicDataId={0} - is not null", basicData.getBasicDataId())); //NOI18N
} else if (this.isSameCompanyNameAdded(basicData)) {
// Throw exception
- throw new BusinessDataAlreadyAddedException(basicData);
+ throw new BasicCompanyDataAlreadyAddedException(basicData);
}
// Now add current date
import javax.persistence.NoResultException;
import javax.persistence.Query;
import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
-import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataNotFoundException;
+import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicCompanyDataNotFoundException;
/**
* A stateless session bean for business data
}
@Override
- public BusinessBasicData findBasicDataById (final Long basicDataId) throws BusinessDataNotFoundException {
+ public BusinessBasicData findBasicDataById (final Long basicDataId) throws BasicCompanyDataNotFoundException {
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findBasicDataById: CALLED!", this.getClass().getSimpleName())); //NOI18N
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findBasicDataById: Found basicData={1}", this.getClass().getSimpleName(), basicData)); //NOI18N
} catch (final NoResultException ex) {
// No result found
- throw new BusinessDataNotFoundException(basicDataId, ex);
+ throw new BasicCompanyDataNotFoundException(basicDataId, ex);
}
// Trace message