Search in sources :

Example 6 with MEntityType

use of org.compiere.model.MEntityType 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

MEntityType (org.compiere.model.MEntityType)6 PreparedStatement (java.sql.PreparedStatement)1 ResultSet (java.sql.ResultSet)1 DecimalFormat (java.text.DecimalFormat)1 POSaveFailedException (org.adempiere.pipo.exception.POSaveFailedException)1 MColumn (org.compiere.model.MColumn)1 MTable (org.compiere.model.MTable)1 MUser (org.compiere.model.MUser)1 X_AD_Reference (org.compiere.model.X_AD_Reference)1 X_AD_Val_Rule (org.compiere.model.X_AD_Val_Rule)1 AdempiereSystemError (org.compiere.util.AdempiereSystemError)1 AdempiereUserError (org.compiere.util.AdempiereUserError)1 Attributes (org.xml.sax.Attributes)1 AttributesImpl (org.xml.sax.helpers.AttributesImpl)1