Search in sources :

Example 36 with AdempiereSystemError

use of org.compiere.util.AdempiereSystemError in project adempiere by adempiere.

the class EntityTypeRegister method doIt.

//	prepare
/**
	 * 	Process
	 *	@return summary
	 *	@throws Exception
	 */
protected String doIt() throws Exception {
    log.info("AD_EntityType_ID=" + p_AD_EntityType_ID);
    MEntityType et = new MEntityType(getCtx(), p_AD_EntityType_ID, get_TrxName());
    if (et.isSystemMaintained())
        throw new AdempiereUserError("You cannot register a System maintained entity");
    throw new AdempiereSystemError("To register an Entity Type, contact Adempiere directly");
//	return "Not Supported Yet";
}
Also used : AdempiereUserError(org.compiere.util.AdempiereUserError) AdempiereSystemError(org.compiere.util.AdempiereSystemError) MEntityType(org.compiere.model.MEntityType)

Aggregations

AdempiereSystemError (org.compiere.util.AdempiereSystemError)36 ResultSet (java.sql.ResultSet)9 BigDecimal (java.math.BigDecimal)8 PreparedStatement (java.sql.PreparedStatement)8 AdempiereUserError (org.compiere.util.AdempiereUserError)8 Timestamp (java.sql.Timestamp)6 MAcctSchema (org.compiere.model.MAcctSchema)5 MPayment (org.compiere.model.MPayment)5 MInvoice (org.compiere.model.MInvoice)4 SQLException (java.sql.SQLException)3 MInventory (org.compiere.model.MInventory)3 MTable (org.compiere.model.MTable)3 Statement (java.sql.Statement)2 SimpleDateFormat (java.text.SimpleDateFormat)2 Vector (java.util.Vector)2 MAccount (org.compiere.model.MAccount)2 MAcctSchemaDefault (org.compiere.model.MAcctSchemaDefault)2 MColumn (org.compiere.model.MColumn)2 MDocType (org.compiere.model.MDocType)2 MWarehouse (org.compiere.model.MWarehouse)2