Mendix Runtime
Documentation for the Mendix Runtime Environment API
com.mendix.core.Core Class Reference

List of all members.

Public Types

enum  Mode {
  DEVELOPMENT, TESTING, ACCEPTANCE, PRODUCTION,
  TRIAL
}

Static Public Member Functions

static Mode getMode ()
static boolean isInDevelopment ()
static String getXASId ()
static Set< String > getMicroflowNames ()
static Map< String, IDataTypegetInputParameters (String actionName)
static IDataType getReturnType (String actionName)
static Object evaluateExpression (IContext context, Map< String, Object > variables, String expression)
static< TextendsCoreAction< R >
R Future< R > 
execute (T action)
static< TextendsCoreAction< R > R R executeSync (T action) throws CoreException
static< R > R execute (IContext context, String actionName, Object...params) throws CoreException
static< R > Future< R > executeAsync (IContext context, String actionName, Object...params) throws CoreException
static< R > R execute (IContext context, String actionName, Map< String, Object > params) throws CoreException
static< R > R execute (IContext context, String actionName, boolean executeInTransaction, Map< String, Object > params) throws CoreException
static< TextendsCoreAction< R >
R void 
executeVoid (T action)
static< R >
RunnableScheduledFuture<?> 
schedule (String actionName, Date date) throws CoreException
static< R >
RunnableScheduledFuture<?> 
schedule (CoreAction< R > action, long delay, TimeUnit timeUnit)
static< R > void scheduleAtFixedRate (String actionName, Date firstRun, long period, TimeUnit timeUnit, String name, String description)
static< R > void scheduleAtFixedRate (CoreAction< R > action, long initialDelay, long period, TimeUnit timeUnit)
static< R > void scheduleAtFixedRate (CoreAction< R > action, Date firstRun, long period, TimeUnit timeUnit)
static< R > void scheduleWithFixedDelay (CoreAction< R > action, long initialDelay, long delay, TimeUnit timeUnit)
static boolean removeScheduledFuture (RunnableScheduledFuture<?> scheduledFuture)
static< R > ScheduledFuture<?> reschedule (RunnableScheduledFuture< R > scheduledFuture, CoreAction< R > action, long newDelay, TimeUnit timeUnit)
static< TextendsCoreAction<?> void addListener (ActionListener< T > al)
static List< Future< List
< IMendixObject > > > 
commitAsync (IContext context, List< IMendixObject > objects)
static IMendixObject commit (IContext context, IMendixObject object) throws CoreException
static List< IMendixObjectcommit (IContext context, List< IMendixObject > objects)
static IMendixObject commitWithoutEvents (IContext context, IMendixObject object)
static List< IMendixObjectcommitWithoutEvents (IContext context, List< IMendixObject > objects)
static Future< IMendixObjectinstantiateAsync (IContext context, String objectType)
static IMendixObject create (IContext context, String objectType) throws CoreException
static IMendixObject instantiate (IContext context, String objectType)
static boolean change (IContext context, IMendixObject object, Map< String, String > changes) throws CoreException
static Future< Boolean > changeAsync (IContext context, IMendixObject obj, Map< String, String > changes)
static Future< IMendixObjectrollbackAsync (IContext context, IMendixIdentifier id) throws CoreException
static Future< IMendixObjectrollbackAsync (IContext context, IMendixObject object)
static IMendixObject rollback (IContext context, IMendixIdentifier id) throws CoreException
static IMendixObject rollback (IContext context, IMendixObject object) throws CoreException
static boolean remove (IContext context, IMendixObject...objects) throws CoreException
static boolean delete (IContext context, IMendixObject...objects)
static boolean delete (IContext context, List< IMendixObject > objectList)
static boolean deleteWithoutEvents (IContext context, List< IMendixObject > objects, boolean useDeleteBehavior)
static List< Future< Boolean > > deleteAsync (IContext context, IMendixObject object, boolean useDeleteBehavior)
static List< Future< Boolean > > deleteAsync (IContext context, List< IMendixObject > objects, boolean useDeleteBehavior)
static Future< List
< IMendixObject > > 
retrieveIdListAsync (IContext context, List< IMendixIdentifier > ids)
static List< IMendixObjectretrieveIdList (IContext context, List< IMendixIdentifier > ids, int amount, int offset, Map< String, String > sort) throws CoreException
static List< IMendixObjectretrieveIdList (IContext context, List< IMendixIdentifier > ids) throws CoreException
static Future< IMendixObjectretrieveIdAsync (IContext context, IMendixIdentifier id)
static IMendixObject retrieveId (IContext context, IMendixIdentifier id) throws CoreException
static List< IMendixObjectretrieveByPath (IContext context, IMendixObject mxObject, String path)
static List< IMendixObjectretrieveByPath (IContext context, IMendixObject mxObject, String path, boolean isSelfAssociationChild)
static Future< List
< IMendixObject > > 
retrieveXPathQueryAsync (IContext context, String xpathQuery, int amount, int offset, Map< String, String > sort, int depth)
static List< IMendixObjectretrieveXPathQuery (IContext context, String xpathQuery, int amount, int offset, Map< String, String > sort, int depth) throws CoreException
static IDataTable retrieveXPathQueryRaw (IContext context, String xpathQuery, int amount, int offset, Map< String, String > sort, int depth) throws CoreException
static IDataTable retrieveXPathSchemaRaw (IContext context, String xpathQuery, boolean shouldRetrieveCount, UUID gridId, int offset, int amount, Map< String, String > sort) throws CoreException
static IDataTable retrieveXPathSchemaRaw (IContext context, String xpathQuery, boolean shouldRetrieveCount, IRetrievalSchema retrievalSchema) throws CoreException
static List< IMendixObjectretrieveXPathSchema (IContext context, String xpathQuery, IRetrievalSchema retrievalSchema, boolean shouldRetrieveCount) throws CoreException
static List< IMendixObjectretrieveXPathSchema (IContext context, String xpathQuery, IRetrievalSchema retrievalSchema, boolean shouldRetrieveCount, boolean disableSecurity) throws CoreException
static List< IMendixObjectretrieveXPathSchema (IContext context, String xpathQuery, boolean shouldRetrieveCount, UUID gridId, int offset, int limit, Map< String, String > sort) throws CoreException
static List< IMendixObjectretrieveXPathQuery (IContext context, String xpathQuery, int amount, int offset, Map< String, String > sort) throws CoreException
static List< IMendixObjectretrieveXPathQuery (IContext context, String xpathQuery, int depth) throws CoreException
static List< IMendixObjectretrieveXPathQuery (IContext context, String xpathQuery) throws CoreException
static List< IMendixObjectretrieveXPathQueryEscaped (IContext context, String xpathFormat, int amount, int offset, Map< String, String > sort, int depth, String...params) throws CoreException
static List< IMendixObjectretrieveXPathSchemaEscaped (IContext context, String xpathFormat, IRetrievalSchema retrievalSchema, boolean shouldRetrieveCount, String...params) throws CoreException
static List< IMendixObjectretrieveXPathSchemaEscaped (IContext context, String xpathFormat, IRetrievalSchema retrievalSchema, boolean shouldRetrieveCount, boolean disableSecurity, String...params) throws CoreException
static List< IMendixObjectretrieveXPathQueryEscaped (IContext context, String xpathFormat, String...params) throws CoreException
static
com.mendix.systemwideinterfaces.core.ICreateBatch 
createBatch (IContext context, String objectType, int batchSize, boolean autoCommit)
static
com.mendix.systemwideinterfaces.core.IChangeBatch 
changeBatch (IContext context, String xpathQuery, int batchSize, boolean autoCommit) throws CoreException
static
com.mendix.systemwideinterfaces.core.IChangeBatch 
changeBatch (IContext context, List< IMendixObject > changeObjects, int batchSize, boolean autoCommit)
static
com.mendix.systemwideinterfaces.core.IRemoveBatch 
removeBatch (IContext context, String objectType, int batchSize, boolean autoCommit, boolean useDeleteBehavior)
static IRetrievalSchema createRetrievalSchema ()
static IMetaAssociationSchema createMetaAssociationSchema (String metaAssociationName, IRetrievalSchema retrievalSchema)
static IXPathTextGetRequest createXPathTextGetRequest ()
static IOQLTextGetRequest createOQLTextGetRequest ()
static Future< IDataTableretrieveOQLDataTableAsync (IContext context, String oqlQuery)
static Future< IDataTableretrieveOQLDataTableAsync (IContext context, IGetRequest request)
static Future< IDataTableretrieveOQLDataTableAsync (IContext context, String oqlQuery, int amount, int offset)
static IDataTable retrieveOQLDataTable (IContext context, IGetRequest request) throws CoreException
static IDataTable retrieveOQLDataTable (IContext context, String oqlQuery) throws CoreException
static IDataTable retrieveOQLDataTable (IContext context, String oqlQuery, int amount, int offset) throws CoreException
static Future< Long > retrieveXPathQueryAggregateAsync (IContext context, String xpathQuery)
static Long retrieveXPathQueryAggregate (IContext context, String xpathQuery) throws CoreException
static Long retrieveXPathQueryAggregateSchema (IContext context, String xpathQuery, IRetrievalSchema retrievalSchema) throws CoreException
static Long retrieveXPathQueryAggregateSchema (IContext context, String xpathQuery, IRetrievalSchema retrievalSchema, boolean disableSecurity) throws CoreException
static Future< Double > retrieveXPathQueryAggregateAsyncDouble (IContext context, String xpathQuery)
static Double retrieveXPathQueryAggregateDouble (IContext context, String xpathQuery) throws CoreException
static InputStream getFileDocumentContent (IContext context, IMendixObject fileDocument)
static File getFileDocumentContentAsFile (IContext context, IMendixObject fileDocument)
static void storeFileDocumentContent (IContext context, IMendixObject fileDocument, String fileName, InputStream inputStream)
static void storeFileDocumentContent (IContext context, IMendixObject fileDocument, InputStream inputStream)
static void storeImageDocumentContent (IContext context, IMendixObject imageDocument, InputStream inputStream, int thumbnailWidth, int thumbnailHeight)
static InputStream getImage (IContext context, IMendixObject imageDocument, boolean retrieveThumbnail)
static boolean isSubClassOf (String superClass, String type)
static boolean isSubClassOf (IMetaObject superObject, IMetaObject type)
static boolean isSubClassOf (String superClass, int typeHash)
static boolean isSubClassOf (String superClass, short typeHash)
static Iterable< IMendixObjectgetAllMendixObjects ()
static List< String > getSubtypesOf (String objectType)
static IMetaObject getMetaObject (String metaObjectName)
static IMetaPrimitive getMetaPrimitive (String qualifiedAttributeName)
static Iterable< IMetaObjectgetMetaObjects ()
static Iterable< IMetaAssociationgetMetaAssociations ()
static IMetaAssociation getMetaAssociation (String association)
static String getDatabaseTableName (IMetaObject iMetaObject)
static String getDatabaseTableName (IMetaAssociation iMetaAssociation)
static String getDatabaseColumnName (IMetaPrimitive iMetaPrimitive)
static String getDatabaseChildColumnName (IMetaAssociation iMetaAssociation)
static String getDatabaseParentColumnName (IMetaAssociation iMetaAssociation)
static IContext getSystemContext ()
static IContext createSystemContext ()
static IMendixIdentifier createMendixIdentifier (String guid)
static IMendixIdentifier createMendixIdentifier (long guid)
static boolean authenticate (IContext context, IUser user, String password) throws CoreException
static ISession login (Map< String,?extends Object > params) throws CoreException
static ISession login (String userName, String password) throws CoreException
static ISession login (String userName, String password, String locale, String currentSessionId) throws CoreException
static ISession login (String userName, String password, String locale, IMxRuntimeRequest request) throws CoreException
static void logout (ISession session)
static IUser getUser (IContext context, String userName) throws CoreException
static ISession initializeSession (@SuppressWarnings("unused") IContext context, IUser user, String currentSessionId, String locale) throws CoreException
static void importXmlStream (IContext context, InputStream xmlStream, String xmlToDomainMappingName, IMendixObject mappingParameter)
static Object importXmlStream (IContext context, InputStream xmlStream, String xmlToDomainMappingName, IMendixObject mappingParameter, boolean storeResultInVariable, boolean hasListReturnValue)
static void addRequestHandler (String path, RequestHandler requestHandler)
static ILogNode getLogger (String name)
static Configuration getConfiguration ()
static Object resolveTokens (IContext context, String text)
static int getActiveActionCount ()
static long getCompletedActionCount ()
static int getActionQueueSize ()
static int getCurrentPoolSize ()
static int getLargestPoolSize ()
static int getScheduledActionCount ()
static int getMaximumNumberConcurrentUsers () throws CoreException
static long getNumberConcurrentUsers ()
static Collection<?extends
ISession
getActiveSessions ()
static ISession getActiveSession (String userName)
static long getNamedUserCount ()
static long getConcurrentUserCount (boolean anonymous)
static String getInternationalizedString (IContext context, String key, Object...args)
static String getInternationalizedString (String languageCode, String key, Object...args)
static ILanguage getDefaultLanguage ()
static Locale getLocale (IContext context)
static Locale getLocale (String languageCode)
static Module getModule (String name)
static Date getStartupDateTime ()
static File getFormPath (String languageCode, String formName)
static Set< String > getFormNames ()
static void registerLogSubscriber (LogSubscriber subscriber)
static void buildException (StringBuilder trace, Throwable e)
static void addUserAction (String actionName)
static IDataType createDataType (String type)
static IDataType createDataType (String objectType, String attributeName)
static IProfiler getProfiler ()
static void registerProfiler (IProfiler profiler) throws MendixException
static void unregisterProfiler ()
static boolean activateLicense (IMendixObject licenseInformation)
static void resetLicense (IMendixObject licenseInformation) throws CoreException
static Future< Boolean > removeAsync (IContext context, IMendixIdentifier id, boolean useDeleteBehavior) throws CoreException

Member Enumeration Documentation

Enumerator:
DEVELOPMENT 
TESTING 
ACCEPTANCE 
PRODUCTION 
TRIAL 

Member Function Documentation

static boolean com.mendix.core.Core.activateLicense ( IMendixObject  licenseInformation) [static]
static <TextendsCoreAction<?> void com.mendix.core.Core.addListener ( ActionListener< T >  al) [static]

Registers the given ActionListener to the ActionManager.

Parameters:
althe ActionListener to add.
static void com.mendix.core.Core.addRequestHandler ( String  path,
RequestHandler  requestHandler 
) [static]

Add a custom request handler to the Mendix Business Server. This request handler will process MxRuntimeRequests on the given path. Responses should be given by adding information to the MxRuntimeResponse.

Parameters:
paththe path for which request should be processed.
requestHandlerthe custom request handler.
static void com.mendix.core.Core.addUserAction ( String  actionName) [static]

Add the action specified by the given action name to action registry. This enables calling Core.execute(actionName) for this action.

Parameters:
actionNamethe fully qualified class name of the action (e.g. com.mendix.action.MyAction).
static boolean com.mendix.core.Core.authenticate ( IContext  context,
IUser  user,
String  password 
) throws CoreException [static]

Authenticate the given user with the given password.

Parameters:
context
userthe user.
passwordthe password.
Returns:
returns true if authentication was successful.
static void com.mendix.core.Core.buildException ( StringBuilder  trace,
Throwable  e 
) [static]

Prints the message and stacktrace of a Throwable and its cause(s).

Parameters:
tracethe StringBuilder the exception is printed to.
ethe Throwable to print.
static boolean com.mendix.core.Core.change ( IContext  context,
IMendixObject  object,
Map< String, String >  changes 
) throws CoreException [static]

Changes the given object in cache (synchronously). When the object is not cache yet, the object will be retrieved from the database and put in the cache. This action is executed in a transaction.

Parameters:
contextthe context.
objectthe object to change.
changescontains changes by member name (e.g. <"Name", "User1">).
Returns:
returns whether the change succeeded or not.
static Future<Boolean> com.mendix.core.Core.changeAsync ( IContext  context,
IMendixObject  obj,
Map< String, String >  changes 
) [static]

Changes the object (asynchronously). Object will be stored in cache. This action is not executed in a transaction.

Parameters:
contextthe context.
objthe MendixObject to change
changescontains changes by member name (e.g. <"Name", "User1">).
Returns:
returns the Future object.
static com.mendix.systemwideinterfaces.core.IChangeBatch com.mendix.core.Core.changeBatch ( IContext  context,
String  xpathQuery,
int  batchSize,
boolean  autoCommit 
) throws CoreException [static]

Create a ChangeBatch.

Deprecated:
This is no longer needed for performance, use Core.commitWithoutEvents.
Parameters:
contextthe context.
xpathQuerythe query to perform to fetch the initial list of objects to change.
batchSizethe number of objects to keep in memory before each commit.
autoCommitindicates if commits are performed automatically if the number of changed objects % batchSize == 0
Returns:
a new instance of IChangeBatch.
static com.mendix.systemwideinterfaces.core.IChangeBatch com.mendix.core.Core.changeBatch ( IContext  context,
List< IMendixObject changeObjects,
int  batchSize,
boolean  autoCommit 
) [static]

Create a ChangeBatch.

Deprecated:
This is no longer needed for performance, use Core.commitWithoutEvents.
Parameters:
contextthe context.
changeObjectsthe initial list of objects to change.
batchSizethe number of objects to keep in memory before each commit.
autoCommitindicates if commits are performed automatically if the number of changed objects % batchSize == 0.
Returns:
a new instance of IChangeBatch.
static IMendixObject com.mendix.core.Core.commit ( IContext  context,
IMendixObject  object 
) throws CoreException [static]

Commits the given object. This will store the object in the database and remove it from the server cache. This action is executed in a transaction.

Parameters:
contextthe context.
objectthe IMendixObject to commit.
Returns:
returns committed object if commit was successful, otherwise null.
static List<IMendixObject> com.mendix.core.Core.commit ( IContext  context,
List< IMendixObject objects 
) [static]

Commits the given objects. This will store the objects in the database and remove them from the server cache. Before events defined for these objects are executed before any object will be committed and after events will be executed after all objects have been committed. This action is executed in a transaction.

Parameters:
contextthe context.
objectsthe objects to commit.
Returns:
returns committed objects if commits was successful, otherwise an empty list.
static List<Future<List<IMendixObject> > > com.mendix.core.Core.commitAsync ( IContext  context,
List< IMendixObject objects 
) [static]

Commits the given object (asynchronously). This will store the object in the database and remove it from the server cache. This action is not executed in a transaction.

Parameters:
contextthe context.
objectsthe instances of IMendixObject to commit.
Returns:
returns a list of future objects with committed object lists, one for each entity type.
static IMendixObject com.mendix.core.Core.commitWithoutEvents ( IContext  context,
IMendixObject  object 
) [static]

Commits the given object without events. This will store the object in the database and remove it from the server cache. This action is executed in a transaction.

Parameters:
contextthe context.
objectthe IMendixObject to commit.
Returns:
returns committed object if commit was successful, otherwise null.
static List<IMendixObject> com.mendix.core.Core.commitWithoutEvents ( IContext  context,
List< IMendixObject objects 
) [static]

Commit the given objects without events. This will store the objects in the database and remove it from the server cache. This action is executed in a transaction.

Parameters:
contextthe context.
objectsthe objects to commit.
Returns:
returns true if commit was successful, otherwise false.
static IMendixObject com.mendix.core.Core.create ( IContext  context,
String  objectType 
) throws CoreException [static]

Creates a new IMendixObject with the given object type (synchronously). The object will be stored in the database immediately. The rollback method can be used to cancel this.

Parameters:
contextthe context.
objectTypetype of object to create (e.g. "System.User").
Returns:
returns the newly created object.
Deprecated:
use Core.instantiate instead.
static com.mendix.systemwideinterfaces.core.ICreateBatch com.mendix.core.Core.createBatch ( IContext  context,
String  objectType,
int  batchSize,
boolean  autoCommit 
) [static]

Returns a new CreateBatch.

Deprecated:
This is no longer needed for performance, use Core.instantiate and Core.commitWithoutEvents.
Parameters:
contextthe context.
objectTypethe type of objects to create.
batchSizethe number of objects to keep in memory before each commit.
autoCommitindicates if commits are performed automatically if the number of created objects % batchSize == 0.
Returns:
a new instance of ICreateBatch.
static IDataType com.mendix.core.Core.createDataType ( String  type) [static]

Creates a DataType based on a type.
Possible types:

  • Boolean
  • Integer
  • Long
  • Float
  • String
  • Datetime
  • {code::id} (enumeration key)
  • ModuleName.ObjectName (IMendixObject)
  • [ModuleName.ObjectName] (List<IMendixObject>)
    Parameters:
    typethe type to base the IDataType on.
    Returns:
    the resulting IDataType.
static IDataType com.mendix.core.Core.createDataType ( String  objectType,
String  attributeName 
) [static]

Creates a DataType based on an object type and a attribute name

Parameters:
objectTypethe object type (format: "ModuleName.EntityName").
attributeNamethe attribute to create the IDataType for (should be a member of above object type)
Returns:
the resulting IDataType
static IMendixIdentifier com.mendix.core.Core.createMendixIdentifier ( String  guid) [static]

Creates a IMendixIdentifier for the given guid.

Parameters:
guidthe guid.
Returns:
returns the created MendixIdentifier.
static IMendixIdentifier com.mendix.core.Core.createMendixIdentifier ( long  guid) [static]

Creates a new IMendixIdentifier for the given guid.

Parameters:
guidthe guid.
Returns:
returns the created MendixIdentifier.
static IMetaAssociationSchema com.mendix.core.Core.createMetaAssociationSchema ( String  metaAssociationName,
IRetrievalSchema  retrievalSchema 
) [static]

Create a new IMetaAssociationSchema to specify which associations must be retrieved. An IMetaAssociationSchema can be added to a request by the method IRetrievalSchema.addMetaAssociationSchema(..).

Parameters:
metaAssociationNamethe name of the meta association of this schema
retrievalSchemathe retrieval schema of the associated meta object
Returns:
an IMetaAssociationSchema
static IOQLTextGetRequest com.mendix.core.Core.createOQLTextGetRequest ( ) [static]

Create a new IOQLTextGetRequest. This class can be used to define a textual OQL retrieval query.

Returns:
an IOQLTextGetRequest.
static IRetrievalSchema com.mendix.core.Core.createRetrievalSchema ( ) [static]

Create a new IRetrievalSchema.

Returns:
an IRetrievalSchema.
static IContext com.mendix.core.Core.createSystemContext ( ) [static]

Returns the context of the system session (this is always a sudo context). The system session has no associated user or user roles.

Returns:
returns the system session context.
static IXPathTextGetRequest com.mendix.core.Core.createXPathTextGetRequest ( ) [static]

Create a new IXPathTextGetRequest. This class can be used to define an XPath retrieval query. The query must be set in textual form.

Returns:
an IXPathTextGetRequest.
static boolean com.mendix.core.Core.delete ( IContext  context,
IMendixObject...  objects 
) [static]

Deletes the given objects from the database and server cache (synchronously). This action is executed in a transaction.

Parameters:
contextthe context.
objectsthe objects to delete.
Returns:
returns whether the delete succeeded.
static boolean com.mendix.core.Core.delete ( IContext  context,
List< IMendixObject objectList 
) [static]

Deletes the given objects from the database and server cache (synchronously). This action is executed in a transaction.

Parameters:
contextthe context.
objectListthe objects to delete.
Returns:
returns whether the delete succeeded.
static List<Future<Boolean> > com.mendix.core.Core.deleteAsync ( IContext  context,
IMendixObject  object,
boolean  useDeleteBehavior 
) [static]

Deletes the given object from the database and server cache (asynchronously). This action is not executed in a transaction.

Parameters:
contextthe context.
objectthe object to delete.
useDeleteBehaviorwhether to use delete behavior.
Returns:
returns a list of future booleans, one for each entity type.
static List<Future<Boolean> > com.mendix.core.Core.deleteAsync ( IContext  context,
List< IMendixObject objects,
boolean  useDeleteBehavior 
) [static]

Deletes the given object from the database and server cache (asynchronously). This action is not executed in a transaction.

Parameters:
contextthe context.
objectsthe objects to delete.
useDeleteBehaviorwhether to use delete behavior.
Returns:
returns a list of future booleans, one for each entity type.
static boolean com.mendix.core.Core.deleteWithoutEvents ( IContext  context,
List< IMendixObject objects,
boolean  useDeleteBehavior 
) [static]

Deletes the given objects from the database and server cache (synchronously) without events This action is executed in a transaction.

Parameters:
contextthe context.
objectsthe objects to delete.
useDeleteBehaviorwhether to use delete behavior.
Returns:
returns whether the delete succeeded.
static Object com.mendix.core.Core.evaluateExpression ( IContext  context,
Map< String, Object >  variables,
String  expression 
) [static]

Evaluate the given (microflow)expression.

Parameters:
contextthe context
variablesname of variables referenced in the expression (without '$') and their values.
expressionthe expression
Returns:
the evaluated value of the expression.
static <TextendsCoreAction<R> R Future<R> com.mendix.core.Core.execute ( action) [static]
static <R> R com.mendix.core.Core.execute ( IContext  context,
String  actionName,
Object...  params 
) throws CoreException [static]

Execute the specified action (synchronously).

Parameters:
contextthe context for this action.
actionNamethe name of a microflow or java action (format "ModuleName.ActionName").
paramsfor microflows: add IMendixObject, IMendixIdentifier or primitive parameters. for Java actions: add any object parameters.
Returns:
return value of the specified action.
static <R> R com.mendix.core.Core.execute ( IContext  context,
String  actionName,
Map< String, Object >  params 
) throws CoreException [static]

Execute the specified action (synchronously).

Parameters:
contextthe context for this action.
actionNamethe name of a microflow or java action (format "ModuleName.ActionName").
paramsaction parameters by name.
Returns:
return value of the specified action.
static <R> R com.mendix.core.Core.execute ( IContext  context,
String  actionName,
boolean  executeInTransaction,
Map< String, Object >  params 
) throws CoreException [static]

Execute the specified action (synchronously).

Parameters:
contextthe context for this action.
actionNamethe name of a microflow or java action (format "ModuleName.ActionName").
executeInTransactiondefines whether the action should be execute in a transaction (enables rolling back changes when exceptions are raised).
paramsaction parameters by name.
Returns:
return value of the specified action.
static <R> Future<R> com.mendix.core.Core.executeAsync ( IContext  context,
String  actionName,
Object...  params 
) throws CoreException [static]

Execute the specified action (asynchronously) Result is given and/or exceptions are raised when calling Future.get(). When calling Future.get() the result of the action will return immediately if the execution is done, otherwise the call is blocking. Exceptions raised while executing the action will not be thrown until Future.get() is called.

Parameters:
contextthe context for this action.
actionNamethe name of a microflow or java action (format "ModuleName.ActionName").
paramsfor microflows: add IMendixObject, IMendixIdentifier or primitive parameters. for Java actions: add any object parameters.
Returns:
the Future object.
static <TextendsCoreAction<R> R R com.mendix.core.Core.executeSync ( action) throws CoreException [static]
static <TextendsCoreAction<R> R void com.mendix.core.Core.executeVoid ( action) [static]
static int com.mendix.core.Core.getActionQueueSize ( ) [static]

Returns the current action pool queue size.

Returns:
returns current queue size of action thread pool.
static int com.mendix.core.Core.getActiveActionCount ( ) [static]

Returns the current number of active actions. This number represents only the actions which were started asynchronously.

Returns:
number of current active actions.
static ISession com.mendix.core.Core.getActiveSession ( String  userName) [static]
Parameters:
userNamethe user name associated with the session to search for.
Returns:
the session associated with the given user name if such a session exists, otherwise null.
static Collection<? extends ISession> com.mendix.core.Core.getActiveSessions ( ) [static]
Returns:
the active sessions.
static Iterable<IMendixObject> com.mendix.core.Core.getAllMendixObjects ( ) [static]

Get all IMendixObject types.

Returns:
returns a list with all IMendixObjects (one object for each existing type)
static long com.mendix.core.Core.getCompletedActionCount ( ) [static]

Returns the number of completed actions since server startup. This number represents only the actions which were started asynchronously.

Returns:
number of completed actions
static long com.mendix.core.Core.getConcurrentUserCount ( boolean  anonymous) [static]

The current number of concurrent users.

Parameters:
anonymouswhether anonymous users should be included in the count.
Returns:
the number of concurrent users.
static Configuration com.mendix.core.Core.getConfiguration ( ) [static]

Returns the current configuration.

Returns:
the configuration.
static int com.mendix.core.Core.getCurrentPoolSize ( ) [static]

Returns the current action pool size.

Returns:
the current size of the action thread pool.
static String com.mendix.core.Core.getDatabaseChildColumnName ( IMetaAssociation  iMetaAssociation) [static]
Parameters:
iMetaAssociationthe meta association to get the database child column name for
Returns:
the name of the database child column name
static String com.mendix.core.Core.getDatabaseColumnName ( IMetaPrimitive  iMetaPrimitive) [static]
Parameters:
iMetaPrimitivethe meta primitive to get the database column name for
Returns:
the name of the database column
static String com.mendix.core.Core.getDatabaseParentColumnName ( IMetaAssociation  iMetaAssociation) [static]
Parameters:
iMetaAssociationthe meta association to get the database parent column name for
Returns:
the name of the database parent column name
static String com.mendix.core.Core.getDatabaseTableName ( IMetaObject  iMetaObject) [static]
Parameters:
iMetaObjectthe meta object to get the database table name for
Returns:
the name of the database table
static String com.mendix.core.Core.getDatabaseTableName ( IMetaAssociation  iMetaAssociation) [static]
Parameters:
iMetaAssociationthe meta association to get the database table name for
Returns:
the name of the database table
static ILanguage com.mendix.core.Core.getDefaultLanguage ( ) [static]

Returns the default language of the loaded project.

Returns:
the default langauge.
static InputStream com.mendix.core.Core.getFileDocumentContent ( IContext  context,
IMendixObject  fileDocument 
) [static]

Returns contents of a file document as an input stream.

Parameters:
contextthe context.
fileDocumentthe file document from which the contents will be returned.
Returns:
the input stream of the file content of the given file document.
static File com.mendix.core.Core.getFileDocumentContentAsFile ( IContext  context,
IMendixObject  fileDocument 
) [static]

Returns contents of a file document as a file. The path of this file is represented by the uploaded files path (default: deployment/data/files) plus the object id.

Parameters:
contextthe context.
fileDocumentthe file document from which the contents will be returned.
Deprecated:
use getFileDocumentContenxt(Context,IMendixObject) instead.
Returns:
the File representing the contents of the file document object.
static Set<String> com.mendix.core.Core.getFormNames ( ) [static]
static File com.mendix.core.Core.getFormPath ( String  languageCode,
String  formName 
) [static]

Returns the full form path.

Parameters:
languageCodethe language code.
formNamethe qualifed form name (e.g. Module.FormName)
Returns:
the form path
Deprecated:
use Core.getFormNames() instead. File path should not be accessed directly.
static InputStream com.mendix.core.Core.getImage ( IContext  context,
IMendixObject  imageDocument,
boolean  retrieveThumbnail 
) [static]

Retrieve contents of the given image document.

Parameters:
contextthe context.
imageDocumentthe image document for which its contents are retrieved.
retrieveThumbnailindicates whether a thumbnail or the full image is retrieved.
Returns:
the image as an input stream.
static Map<String, IDataType> com.mendix.core.Core.getInputParameters ( String  actionName) [static]

Returns all input parameter data types the specified action by name.

Parameters:
actionNamethe name of a microflow or java action (format "ModuleName.ActionName").
Returns:
data types by input parameter name.
static String com.mendix.core.Core.getInternationalizedString ( IContext  context,
String  key,
Object...  args 
) [static]

Returns the translated string for a certain key and context. The context is used to retrieve the language of the current user.

Parameters:
contextthe context.
keythe key referring to the translatable string.
argsthe arguments which should be applied to translatable string template.
Returns:
the translated string.
static String com.mendix.core.Core.getInternationalizedString ( String  languageCode,
String  key,
Object...  args 
) [static]

Returns the translated string for a certain key and language code.

Parameters:
languageCodethe language code (ISO-639).
keythe key referring to the translatable string.
argsvalues which should replace possible templates in the translatable string ({1}, {2}, etc.).
Returns:
the translated string.
static int com.mendix.core.Core.getLargestPoolSize ( ) [static]

Returns the largest action pool size.

Returns:
the maximum number of threads the thread pool has ever ran.
static Locale com.mendix.core.Core.getLocale ( IContext  context) [static]

Retrieve locale using the given context.

Parameters:
contextthe context.
Returns:
the Locale.
static Locale com.mendix.core.Core.getLocale ( String  languageCode) [static]

Retrieve locale using the given language code (e.g. en_US).

Parameters:
languageCodethe languageCode (ISO-639).
Returns:
the Locale.
static ILogNode com.mendix.core.Core.getLogger ( String  name) [static]
static int com.mendix.core.Core.getMaximumNumberConcurrentUsers ( ) throws CoreException [static]

Returns the maximum number of concurrent users since the server was started.

Returns:
maximum number of concurrent users.
static IMetaAssociation com.mendix.core.Core.getMetaAssociation ( String  association) [static]

Get the IMetaAssociation corresponding to the given association name.

Parameters:
associationthe association name (e.g. "System.UserRoles").
Returns:
returns the IMetaAssociation for the given association name.
static Iterable<IMetaAssociation> com.mendix.core.Core.getMetaAssociations ( ) [static]

Get all IMetaAssociations.

Returns:
returns all IMetaAssociations.
static IMetaObject com.mendix.core.Core.getMetaObject ( String  metaObjectName) [static]

Get the IMetaObject corresponding to the given meta object name.

Parameters:
metaObjectNamethe meta object name.
Returns:
returns the IMetaObject for the given metaObjectName
static Iterable<IMetaObject> com.mendix.core.Core.getMetaObjects ( ) [static]

Get all IMetaObjects.

Returns:
returns all IMetaObjects.
static IMetaPrimitive com.mendix.core.Core.getMetaPrimitive ( String  qualifiedAttributeName) [static]

Get the IMetaPrimtive based on a qualified attribute name (e.g. "System.User.Name").

Parameters:
qualifiedAttributeNamethe qualified attribute name.
Returns:
the IMetaPrimtive.
static Set<String> com.mendix.core.Core.getMicroflowNames ( ) [static]

Returns the names of all modeled microflows.

Returns:
all microflow names (format "ModuleName.MicroflowName").
static Mode com.mendix.core.Core.getMode ( ) [static]
static Module com.mendix.core.Core.getModule ( String  name) [static]

Returns the module specified by the given name.

Parameters:
namethe name of the module.
Returns:
the module.
static long com.mendix.core.Core.getNamedUserCount ( ) [static]
static long com.mendix.core.Core.getNumberConcurrentUsers ( ) [static]

Returns current number of concurrent users (live sessions).

static IProfiler com.mendix.core.Core.getProfiler ( ) [static]
static IDataType com.mendix.core.Core.getReturnType ( String  actionName) [static]

Returns the return type of the specified action.

Parameters:
actionNamethe name of a microflow or java action (format "ModuleName.ActionName").
Returns:
the return data type of the specified action.
static int com.mendix.core.Core.getScheduledActionCount ( ) [static]

Returns the number of actions currently scheduled for future execution.

Returns:
the number of scheduled actions.
static Date com.mendix.core.Core.getStartupDateTime ( ) [static]

Returns the startup date time of the Mendix Business Server.

Returns:
the date time on which the Mendix Business Server was started.
static List<String> com.mendix.core.Core.getSubtypesOf ( String  objectType) [static]

Get all subtypes for an object type (including subtypes of subtypes, etc.).

Parameters:
objectTypethe object type.
Returns:
list of subtypes, in no particular order.
static IContext com.mendix.core.Core.getSystemContext ( ) [static]
Deprecated:
use createSystemContext instead
static IUser com.mendix.core.Core.getUser ( IContext  context,
String  userName 
) throws CoreException [static]

Returns a user using the given user name.

Parameters:
contextthe context.
userNamethe user name to retrieve a user for.
Returns:
the retrieved user.
static String com.mendix.core.Core.getXASId ( ) [static]

Returns the id of this server instance.

Returns:
the server id in UUID format.
static void com.mendix.core.Core.importXmlStream ( IContext  context,
InputStream  xmlStream,
String  xmlToDomainMappingName,
IMendixObject  mappingParameter 
) [static]

Import an xml stream, map this stream to domain objects and store those object in the Mendix database.

Parameters:
contextthe context.
xmlStreamthe xml stream to map and store.
xmlToDomainMappingNamename of the mapping from xml to domain objects (as defined in the Mendix Business Modeler, e.g. "Orders.MyMapping").
mappingParameterparameter object used during the mapping (optional)
static Object com.mendix.core.Core.importXmlStream ( IContext  context,
InputStream  xmlStream,
String  xmlToDomainMappingName,
IMendixObject  mappingParameter,
boolean  storeResultInVariable,
boolean  hasListReturnValue 
) [static]

Import an xml stream, map this stream to domain objects and store those object in the Mendix database.

Parameters:
contextthe context.
xmlStreamthe xml stream to map and store.
xmlToDomainMappingNamename of the mapping from xml to domain objects (as defined in the Mendix Business Modeler, e.g. "Orders.MyMapping").
mappingParameterparameter object used during the mapping (optional)
storeResultInVariablewhether to store the result of the xml mapping in variable which will be returned by this method.
hasListReturnValueindicates whether the return value of the xml mapping is of type List.
static ISession com.mendix.core.Core.initializeSession ( @SuppressWarnings("unused") IContext  context,
IUser  user,
String  currentSessionId,
String  locale 
) throws CoreException [static]

Initialize a new session for the given user.

Parameters:
contextthe context.
userthe user for which the session should be initialized.
currentSessionIdid of the current session, will be used to transfer data when current session is associated with a guest user.
localedetermines the user's language. The existing language remains set if available. The default language is used when no language was set and locale is null or empty.
Returns:
the created session.
static IMendixObject com.mendix.core.Core.instantiate ( IContext  context,
String  objectType 
) [static]

Creates a new IMendixObject with the given object type (synchronously). The object will NOT be stored in the database. This action is executed in a transaction.

Parameters:
contextthe context.
objectTypetype of object to create (e.g. "System.User").
Returns:
returns the newly created object.
static Future<IMendixObject> com.mendix.core.Core.instantiateAsync ( IContext  context,
String  objectType 
) [static]

Creates a new IMendixObject with the given object type (asynchronously). The object will NOT be stored in the database. This action is not executed in a transaction.

Parameters:
contextthe context.
objectTypetype of object to create (e.g. "System.User").
Returns:
returns the Future object.
static boolean com.mendix.core.Core.isInDevelopment ( ) [static]
static boolean com.mendix.core.Core.isSubClassOf ( String  superClass,
String  type 
) [static]

Checks whether a type is a subclass of or equal to a potential super class.

Parameters:
superClassthe name of the super class
typethe name of the type to check
Returns:
returns true if type is a subclass of superClass or if type equals superClass
static boolean com.mendix.core.Core.isSubClassOf ( IMetaObject  superObject,
IMetaObject  type 
) [static]

Checks whether a type is a subclass of or equal to a potential super class.

Parameters:
superObjectthe super object.
typethe name of the type to check.
Returns:
returns true if type is a subclass of superClass or if type equals superClass.
static boolean com.mendix.core.Core.isSubClassOf ( String  superClass,
int  typeHash 
) [static]

Checks whether a type is a subclass of or equal to a potential super class.

Parameters:
superClassthe name of the super class
typeHashthe hash of the name of the type to check
Returns:
returns true if type is a subclass of superClass or if type equals superClass
Deprecated:
Use the method call with a short as parameter instead.
Exceptions:
CoreException
static boolean com.mendix.core.Core.isSubClassOf ( String  superClass,
short  typeHash 
) [static]

Checks whether a type is a subclass of or equal to a potential super class.

Parameters:
superClassthe name of the super class
typeHashthe hash of the name of the type to check
Returns:
returns true if type is a subclass of superClass or if type equals superClass
Exceptions:
CoreException
static ISession com.mendix.core.Core.login ( Map< String,?extends Object >  params) throws CoreException [static]

Generic login method (can be used in modules in combination with LoginAction replacement).

Parameters:
paramsthe params.
Returns:
the created session if login was successful.
static ISession com.mendix.core.Core.login ( String  userName,
String  password 
) throws CoreException [static]

Login user with the given user name and password.

Parameters:
userNamethe user name.
passwordthe password.
Returns:
the created session if login is successful.
static ISession com.mendix.core.Core.login ( String  userName,
String  password,
String  locale,
String  currentSessionId 
) throws CoreException [static]

Login user with the given parameters.

Parameters:
userNamethe user name.
passwordthe password.
localethe locale.
currentSessionIdcurrent session UUID.
Returns:
the created session if login is successful.
static ISession com.mendix.core.Core.login ( String  userName,
String  password,
String  locale,
IMxRuntimeRequest  request 
) throws CoreException [static]
static void com.mendix.core.Core.logout ( ISession  session) [static]

Logout the given session. When the session is persistent it will be removed from the database. If the session is not persistent it will removed from the session cache.

Parameters:
sessionthe session to logout.
static void com.mendix.core.Core.registerLogSubscriber ( LogSubscriber  subscriber) [static]
static void com.mendix.core.Core.registerProfiler ( IProfiler  profiler) throws MendixException [static]
static boolean com.mendix.core.Core.remove ( IContext  context,
IMendixObject...  objects 
) throws CoreException [static]

Removes the given objects from the database and server cache (synchronously). Before events defined for these objects are executed before any object will be deleted and after events will be executed after all objects have been deleted.

Parameters:
contextthe context.
objectsthe objects to remove.
Returns:
returns whether the remove succeeded.
Deprecated:
Replaced by {delete(IContext, IMendixObject[])
static Future<Boolean> com.mendix.core.Core.removeAsync ( IContext  context,
IMendixIdentifier  id,
boolean  useDeleteBehavior 
) throws CoreException [static]

Removes the object with the given id from the database and server cache (asynchronously).

Parameters:
contextthe context.
idid of the object to remove.
useDeleteBehaviorwhether to use delete behavior.
Returns:
returns the Future object.
Deprecated:
use Core.deleteAsync() instead. This new version does not allow passing an identifier but only objects, however within this deprecated method the object is simply retrieved using Core.retrieveId() as well. To make this perform better, you should gather ids and retrieve all objects with Core.retrieveIdList() and then use Core.deleteAsync using the list.
static com.mendix.systemwideinterfaces.core.IRemoveBatch com.mendix.core.Core.removeBatch ( IContext  context,
String  objectType,
int  batchSize,
boolean  autoCommit,
boolean  useDeleteBehavior 
) [static]

Creates a RemoveBatch.

Deprecated:
This is no longer needed for performance, use Core.deleteWithoutEvents.
Parameters:
contextthe context.
objectTypethe type of objects to remove
batchSizethe number of objects to keep in memory before each commit.
autoCommitindicates if commits are performed automatically if the number of removed objects % batchSize == 0.
useDeleteBehaviorindicates if deletebehavior should be applied for each object that is removed.
Returns:
a new RemoveBatch.
static boolean com.mendix.core.Core.removeScheduledFuture ( RunnableScheduledFuture<?>  scheduledFuture) [static]

Remove scheduled future.

Parameters:
scheduledFuturethe RunnableScheduledFuture to remove.
Returns:
whether removing the RunnableScheduledFuture was successful.
static <R> ScheduledFuture<?> com.mendix.core.Core.reschedule ( RunnableScheduledFuture< R >  scheduledFuture,
CoreAction< R >  action,
long  newDelay,
TimeUnit  timeUnit 
) [static]

Reschedule an action with a new delay.

Parameters:
scheduledFuturethe scheduledFuture (old action) to remove from the queue.
actionthe action to reschedule.
newDelaythe new delay.
timeUnittime unit of the delay.
Returns:
scheduled future object.
static void com.mendix.core.Core.resetLicense ( IMendixObject  licenseInformation) throws CoreException [static]
static Object com.mendix.core.Core.resolveTokens ( IContext  context,
String  text 
) [static]

Resolve tokens in the given text. Possible tokens:

  • [CurrentDateTime%]
  • [CurrentUser%]
  • [SecondLength%]
  • [MinuteLength%]
  • [HourLength%]
  • [DayLength%]
  • [WeekLength%]
  • [MonthLength%]
  • [YearLength%]
  • [BeginOfCurrentMinute%]
  • [EndOfCurrentMinute%]
  • [BeginOfCurrentHour%]
  • [BeginOfCurrentDay%]
  • [EndOfCurrentDay%]
  • [BeginOfCurrentWeek%]
  • [EndOfCurrentWeek%]
  • [BeginOfCurrentMonth%]
  • [EndOfCurrentMonth%]
  • [BeginOfCurrentYear%]
  • [EndOfCurrentYear%]
  • [UserRole_Name%%] (e.g. [UserRole_Administrator%])
    Parameters:
    textthe text to resolve.
    contextthe context.
    Returns:
    the resolved object.
static List<IMendixObject> com.mendix.core.Core.retrieveByPath ( IContext  context,
IMendixObject  mxObject,
String  path 
) [static]

Retrieves objects using the given object and path.

Parameters:
contextthe context.
mxObjectthe start point of the path.
paththe path (association) to the objects to retrieve.
Returns:
the list of retrieved objects.
static List<IMendixObject> com.mendix.core.Core.retrieveByPath ( IContext  context,
IMendixObject  mxObject,
String  path,
boolean  isSelfAssociationChild 
) [static]

Retrieves objects using the given object and path.

Parameters:
contextthe context.
mxObjectthe start point of the path.
paththe path (association) to the objects to retrieve.
isSelfAssociationChilddefines whether the mxObject instance is the child of the path of a self association.
Returns:
the list of retrieved objects.
static IMendixObject com.mendix.core.Core.retrieveId ( IContext  context,
IMendixIdentifier  id 
) throws CoreException [static]

Retrieves object with the given id (synchronously). First, the object is attempted to be retrieved from the cache. When the object cannot be retrieve from the cache it will be retrieved from the database.

Parameters:
contextthe context.
idid of the object to retrieve.
Returns:
returns the Future object.
static Future<IMendixObject> com.mendix.core.Core.retrieveIdAsync ( IContext  context,
IMendixIdentifier  id 
) [static]

Retrieves object with the given id (asynchronously). First, the object is attempted to be retrieved from the cache. When the object cannot be retrieve from the cache it will be retrieved from the database.

Parameters:
contextthe context.
idid of the object to retrieve.
Returns:
returns the Future object.
static List<IMendixObject> com.mendix.core.Core.retrieveIdList ( IContext  context,
List< IMendixIdentifier ids,
int  amount,
int  offset,
Map< String, String >  sort 
) throws CoreException [static]

Retrieves objects with the given ids (synchronously). First, objects are attempted to be retrieved from cache. When an object cannot be retrieve from the cache it will be retrieved from the database. When (amount > 0) || (offset > 0) || (sort.size() > 0), all objects will be retrieve from the database.

Parameters:
contextthe context.
idsids of the objects to retrieve.
amountthe maximum number of objects to retrieve from the database.
offsetoffset of returned objects when retrieved from the database.
sortsorting of returned objects when retrieved from the database (e.g. <"Name", "ASC">, <"Age", "DESC">).
Returns:
returns the Future object.
static List<IMendixObject> com.mendix.core.Core.retrieveIdList ( IContext  context,
List< IMendixIdentifier ids 
) throws CoreException [static]

Retrieves objects with the given ids (synchronously). First, objects are attempted to be retrieved from cache. When an object cannot be retrieved from the cache it will be retrieved from the database. When (amount > 0) || (offset > 0) || (sort.size() > 0), all objects will be retrieved from the database.

Parameters:
contextthe context.
idsids of the objects to retrieve.
Returns:
returns the objects of the given ids.
static Future<List<IMendixObject> > com.mendix.core.Core.retrieveIdListAsync ( IContext  context,
List< IMendixIdentifier ids 
) [static]

Retrieves objects with the given ids (asynchronously). First, objects are attempted to be retrieved from cache. When an object cannot be retrieve from the cache it will be retrieved from the database. When (amount > 0) || (offset > 0) || (sort.size() > 0), all objects will be retrieve from the database.

Parameters:
contextthe context.
idsids of the objects to retrieve.
Returns:
returns the Future object.
static IDataTable com.mendix.core.Core.retrieveOQLDataTable ( IContext  context,
IGetRequest  request 
) throws CoreException [static]

Retrieve raw data (IDataTable) using an IGetRequest object (synchronously).

Parameters:
contextthe context.
requestthe request object.
Returns:
the data table containing the raw data.
static IDataTable com.mendix.core.Core.retrieveOQLDataTable ( IContext  context,
String  oqlQuery 
) throws CoreException [static]

Retrieve raw data (IDataTable) using an IGetRequest object (synchronously).

Parameters:
contextthe context.
oqlQuerythe OQL query to execute.
Returns:
the data table containing the raw data.
static IDataTable com.mendix.core.Core.retrieveOQLDataTable ( IContext  context,
String  oqlQuery,
int  amount,
int  offset 
) throws CoreException [static]

Retrieve raw data (IDataTable) using an OQL query (asynchronously).

Parameters:
contextthe context.
oqlQuerythe OQL query to execute.
amountmaximum number of objects to retrieve.
offsetindex of first object to retrieve.
Returns:
the data table containing the raw data.
static Future<IDataTable> com.mendix.core.Core.retrieveOQLDataTableAsync ( IContext  context,
String  oqlQuery 
) [static]

Retrieve raw data (IDataTable) using an OQL query (asynchronously).

Parameters:
contextthe context.
oqlQuerythe OQL query to execute.
Returns:
the Future object.
static Future<IDataTable> com.mendix.core.Core.retrieveOQLDataTableAsync ( IContext  context,
IGetRequest  request 
) [static]

Retrieve raw data (IDataTable) using an IGetRequest object (asynchronously).

Parameters:
contextthe context.
requestthe request object.
Returns:
the Future object.
static Future<IDataTable> com.mendix.core.Core.retrieveOQLDataTableAsync ( IContext  context,
String  oqlQuery,
int  amount,
int  offset 
) [static]

Retrieve raw data (IDataTable) using an OQL query (asynchronously).

Parameters:
contextthe context.
oqlQuerythe OQL query to execute.
amountmaximum number of objects to retrieve.
offsetindex of first object to retrieve.
Returns:
the Future object.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathQuery ( IContext  context,
String  xpathQuery,
int  amount,
int  offset,
Map< String, String >  sort,
int  depth 
) throws CoreException [static]

Retrieves object list based on the given XPath query (synchronously).

Parameters:
contextthe context.
xpathQuerythe XPath query to execute.
amountmaximum number of objects to retrieve.
offsetindex of first object to retrieve.
sortsorting of returned objects when retrieved from the database (e.g. <"Name", "ASC">, <"Age", "DESC">).
depthindicates the level until which each reference (IMendixIdentifier) is also retrieved as an IMendixObject.
Returns:
the list of retrieved objects.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathQuery ( IContext  context,
String  xpathQuery,
int  amount,
int  offset,
Map< String, String >  sort 
) throws CoreException [static]

Retrieves object list based on the given XPath query (synchronously).

Parameters:
contextthe context.
xpathQuerythe XPath query to execute.
amountmaximum number of objects to retrieve.
offsetindex of first object to retrieve.
sortsorting of returned objects when retrieved from the database (e.g. <"Name", "ASC">, <"Age", "DESC">).
Returns:
the list of retrieved objects.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathQuery ( IContext  context,
String  xpathQuery,
int  depth 
) throws CoreException [static]

Retrieves object list based on the given XPath query (synchronously).

Parameters:
contextthe context.
xpathQuerythe XPath query to execute.
depthindicates the level until which each reference (IMendixIdentifier) is also retrieved as an IMendixObject.
Returns:
the list of retrieved objects.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathQuery ( IContext  context,
String  xpathQuery 
) throws CoreException [static]

Retrieves object list based on the given XPath query (synchronously).

Parameters:
contextthe context.
xpathQuerythe XPath query to execute.
Returns:
the list of retrieved objects.
static Long com.mendix.core.Core.retrieveXPathQueryAggregate ( IContext  context,
String  xpathQuery 
) throws CoreException [static]

Retrieves long aggregate value based on the given query (root element of the query should be an aggregate function) (synchronously).

Parameters:
contextthe context.
xpathQuerythe aggregate xpath query (e.g. "COUNT(//System.User)").
Returns:
the Future object.
static Future<Long> com.mendix.core.Core.retrieveXPathQueryAggregateAsync ( IContext  context,
String  xpathQuery 
) [static]

Retrieves long aggregate value based on the given query (root element of the query should be an aggregate function) (asynchronously).

Parameters:
contextthe context.
xpathQuerythe aggregate xpath query (e.g. "COUNT(//System.User)").
Returns:
the Future object.
static Future<Double> com.mendix.core.Core.retrieveXPathQueryAggregateAsyncDouble ( IContext  context,
String  xpathQuery 
) [static]

Retrieves long value based on the given query (query should have an aggregate function as root element)

Parameters:
context
xpathQuery
Returns:
returns Future object for action control and return of action result
static Double com.mendix.core.Core.retrieveXPathQueryAggregateDouble ( IContext  context,
String  xpathQuery 
) throws CoreException [static]

Retrieves double aggregate value based on the given query (root element of the query should be an aggregate function) (synchronously).

Parameters:
contextthe context.
xpathQuerythe aggregate xpath query (e.g. "COUNT(//System.User)").
Returns:
the Future object.
static Long com.mendix.core.Core.retrieveXPathQueryAggregateSchema ( IContext  context,
String  xpathQuery,
IRetrievalSchema  retrievalSchema 
) throws CoreException [static]

Retrieves long aggregate value based on the given query and schema (root element of the query should be an aggregate function) (asynchronously).

Parameters:
contextthe context.
xpathQuerythe aggregate xpath query (e.g. "COUNT(//System.User)").
retrievalSchemathe schema.
Returns:
the aggregate value.
static Long com.mendix.core.Core.retrieveXPathQueryAggregateSchema ( IContext  context,
String  xpathQuery,
IRetrievalSchema  retrievalSchema,
boolean  disableSecurity 
) throws CoreException [static]

Retrieves long aggregate value based on the given query and schema (root element of the query should be an aggregate function) (asynchronously).

Parameters:
contextthe context.
xpathQuerythe aggregate xpath query (e.g. "COUNT(//System.User)").
retrievalSchemathe schema.
disableSecuritywhether security should be applied for this retrieval.
Returns:
the aggregate value.
static Future<List<IMendixObject> > com.mendix.core.Core.retrieveXPathQueryAsync ( IContext  context,
String  xpathQuery,
int  amount,
int  offset,
Map< String, String >  sort,
int  depth 
) [static]

Retrieves object list based on the given XPath query (asynchronously).

Parameters:
contextthe context.
xpathQuerythe XPath query to execute.
amountmaximum number of objects to retrieve.
offsetindex of first object to retrieve.
sortsorting of returned objects when retrieved from the database (e.g. <"Name", "ASC">, <"Age", "DESC">).
depthindicates the level until which each reference (IMendixIdentifier) is also retrieved as an IMendixObject.
Returns:
the Future object.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathQueryEscaped ( IContext  context,
String  xpathFormat,
int  amount,
int  offset,
Map< String, String >  sort,
int  depth,
String...  params 
) throws CoreException [static]

Retrieves object list based on the given XPath query (synchronously).

Parameters:
contextthe context.
xpathFormatthe XPath query to execute with s for each param to escape.
amountmaximum number of objects to retrieve.
offsetindex of first object to retrieve.
sortsorting of returned objects when retrieved from the database (e.g. <"Name", "ASC">, <"Age", "DESC">).
depthdepth of the retrieval (0 is all attributes and association guids, 1 is also all attributes of 1-deep associations and 2-deep associaton guids etc.).
paramsxpath arguments.
Returns:
the list of retrieved objects.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathQueryEscaped ( IContext  context,
String  xpathFormat,
String...  params 
) throws CoreException [static]

Retrieves object list based on the given XPath query (synchronously).

Parameters:
contextthe context.
xpathFormatthe XPath query to execute with s for each param to escape.
paramsa collection of parameters for each s in xpathFormat.
Returns:
the list of retrieved objects.
static IDataTable com.mendix.core.Core.retrieveXPathQueryRaw ( IContext  context,
String  xpathQuery,
int  amount,
int  offset,
Map< String, String >  sort,
int  depth 
) throws CoreException [static]

Retrieves raw data (IDataTables) based on the given XPath query (synchronously).

Parameters:
contextthe context.
xpathQuerythe XPath query to execute.
amountmaximum number of objects to retrieve.
offsetindex of first object to retrieve.
sortsorting of returned objects when retrieved from the database (e.g. <"Name", "ASC">, <"Age", "DESC">).
depthindicates the level until which each reference (IMendixIdentifier) is also retrieved as an IMendixObject.
Returns:
the data table containing the raw data.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathSchema ( IContext  context,
String  xpathQuery,
IRetrievalSchema  retrievalSchema,
boolean  shouldRetrieveCount 
) throws CoreException [static]

Retrieves objects based on the XPath query and given schema (synchronously).

Parameters:
contextthe context.
xpathQuerythe XPath query to execute.
retrievalSchemathe schema to apply.
shouldRetrieveCountindicates whether the total number object corresponding to the given schema should be included in the result.
Returns:
the list of retrieved objects.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathSchema ( IContext  context,
String  xpathQuery,
IRetrievalSchema  retrievalSchema,
boolean  shouldRetrieveCount,
boolean  disableSecurity 
) throws CoreException [static]

Retrieves objects based on the XPath query and given schema (synchronously).

Parameters:
contextthe context.
xpathQuerythe XPath query to execute.
retrievalSchemathe schema to apply.
shouldRetrieveCountindicates whether the total number object corresponding to the given schema should be included in the result.
disableSecurityindicates whether security should be applied when this query is being executed.
Returns:
the list of retrieved objects.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathSchema ( IContext  context,
String  xpathQuery,
boolean  shouldRetrieveCount,
UUID  gridId,
int  offset,
int  limit,
Map< String, String >  sort 
) throws CoreException [static]

Retrieves a list of objects based on the given XPath query (synchronously).

Parameters:
contextthe context.
shouldRetrieveCountwhether the number of objects should also be retrieved.
gridIdthe id of the grid to which the schema should adhere.
limitthe number of objects to retrieve
xpathQuerythe XPath query to execute.
offsetindex of first object to retrieve.
sortsorting of returned objects when retrieved from the database (e.g. <"Name", "ASC">, <"Age", "DESC">).
Returns:
the data table containing the raw data.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathSchemaEscaped ( IContext  context,
String  xpathFormat,
IRetrievalSchema  retrievalSchema,
boolean  shouldRetrieveCount,
String...  params 
) throws CoreException [static]

Retrieves object list based on the given XPath query (synchronously).

Parameters:
contextthe context.
xpathFormatthe XPath query to execute with s for each param to escape.
retrievalSchemathe schema to apply.
shouldRetrieveCountindicates whether the total number object corresponding to the given schema should be included in the result.
paramsa collection of parameters for each s in xpathFormat.
Returns:
the list of retrieved objects.
static List<IMendixObject> com.mendix.core.Core.retrieveXPathSchemaEscaped ( IContext  context,
String  xpathFormat,
IRetrievalSchema  retrievalSchema,
boolean  shouldRetrieveCount,
boolean  disableSecurity,
String...  params 
) throws CoreException [static]

Retrieves object list based on the given XPath query (synchronously).

Parameters:
contextthe context.
xpathFormatthe XPath query to execute with s for each param to escape.
retrievalSchemathe schema to apply.
shouldRetrieveCountindicates whether the total number object corresponding to the given schema should be included in the result.
disableSecurityindicates whether security should be disabled when executing this query.
paramsa collection of parameters for each s in xpathFormat.
Returns:
the list of retrieved objects.
static IDataTable com.mendix.core.Core.retrieveXPathSchemaRaw ( IContext  context,
String  xpathQuery,
boolean  shouldRetrieveCount,
UUID  gridId,
int  offset,
int  amount,
Map< String, String >  sort 
) throws CoreException [static]

Retrieves raw data (IDataTables) based on the schema of the given grid id (synchronously).

Parameters:
contextthe context.
xpathQuerythe xpath query.
shouldRetrieveCountindicates whether the total number object corresponding to the given schema should be included in the result.
gridIdid of the grid that indicates which data should be retrieved (based on its columns).
offsetindex of first object to retrieve.
amountmaximum number of objects to retrieve.
sortsorting of returned objects when retrieved from the database (e.g. <"Name", "ASC">, <"Age", "DESC">).
Returns:
the data table containing the raw data.
static IDataTable com.mendix.core.Core.retrieveXPathSchemaRaw ( IContext  context,
String  xpathQuery,
boolean  shouldRetrieveCount,
IRetrievalSchema  retrievalSchema 
) throws CoreException [static]

Retrieves raw data (IDataTables) based on the XPath query and given schema (synchronously).

Parameters:
contextthe context.
xpathQuerythe XPath query to execute.
shouldRetrieveCountindicates whether the total number object corresponding to the given schema should be included in the result.
retrievalSchemathe schema to apply.
Returns:
the data table containing the raw data.
static IMendixObject com.mendix.core.Core.rollback ( IContext  context,
IMendixIdentifier  id 
) throws CoreException [static]

Rollback changes of the object with the given id (synchronously). When the object's state is NORMAL: Removes the object from the cache, all performed changes without commit will be lost. When the object's state is NEW: Removes the object from the database.

Parameters:
contextthe context.
idthe identifier of the object to rollback.
Returns:
returns the Future object.
static IMendixObject com.mendix.core.Core.rollback ( IContext  context,
IMendixObject  object 
) throws CoreException [static]

Rollback changes of the object with the given id (synchronously). When the object's state is NORMAL: Removes the object from the cache, all performed changes without commit will be lost. When the object's state is NEW: Removes the object from the database. This action is executed in a transaction.

Parameters:
contextthe context.
objectthe object to rollback.
Returns:
returns the Future object.
static Future<IMendixObject> com.mendix.core.Core.rollbackAsync ( IContext  context,
IMendixIdentifier  id 
) throws CoreException [static]

Rollback changes of the object with the given id (asynchronously). When the object's state is NORMAL: Removes the object from the cache, all performed changes without commit will be lost. When the object's state is NEW: Removes the object from the database.

Parameters:
contextthe context.
idthe identifier of the object to rollback.
Returns:
returns the Future object.
Exceptions:
CoreException
static Future<IMendixObject> com.mendix.core.Core.rollbackAsync ( IContext  context,
IMendixObject  object 
) [static]

Rollback changes of the object with the given id (asynchronously). When the object's state is NORMAL: Removes the object from the cache, all performed changes without commit will be lost. When the object's state is NEW: Removes the object from the database. This action is not executed in a transaction.

Parameters:
contextthe context.
objectthe object to rollback.
Returns:
returns the Future object.
static <R> RunnableScheduledFuture<?> com.mendix.core.Core.schedule ( String  actionName,
Date  date 
) throws CoreException [static]

Schedule an action on a certain date.

Parameters:
actionNamethe name of a microflow or java action (format "ModuleName.ActionName")
datethe date and time on which the action should be executed
Returns:
the RunnableScheduledFuture object for keeping track of the result
static <R> RunnableScheduledFuture<?> com.mendix.core.Core.schedule ( CoreAction< R >  action,
long  delay,
TimeUnit  timeUnit 
) [static]

Schedule an action on a certain delay from now.

Parameters:
actionthe action to execute.
delaythe delay after which the action should be executed.
timeUnittime unit in which the delay is specified.
Returns:
returns RunnableScheduleFuture object for keeping track of the result.
static <R> void com.mendix.core.Core.scheduleAtFixedRate ( String  actionName,
Date  firstRun,
long  period,
TimeUnit  timeUnit,
String  name,
String  description 
) [static]

Schedule a periodic action that runs for the first time after the given initial delay (first run), and subsequently with the given period; that is executions will commence after initialDelay then initialDelay+period, then initialDelay + 2 * period, and so on. No result will be returned.

Parameters:
actionNamethe name of a microflow or java action (format "ModuleName.ActionName").
firstRunthe date on which the action will be executed the first time.
periodthe period between each start of the execution of the action.
timeUnitthe timeUnit in which the initialDelay and the period is specified.
namethe name of the scheduled event.
descriptionthe description of the scheduled event.
static <R> void com.mendix.core.Core.scheduleAtFixedRate ( CoreAction< R >  action,
long  initialDelay,
long  period,
TimeUnit  timeUnit 
) [static]

Schedule a periodic action that runs for the first time after the given initial delay, and subsequently with the given period; that is executions will commence after initialDelay then initialDelay+period, then initialDelay + 2 * period, and so on. No result will be returned.

Parameters:
actionthe action to execute.
initialDelaythe delay after which the action will be executed the first time.
periodthe period between each start of the execution of the action.
timeUnitthe timeUnit in which the initialDelay and the period is specified.
static <R> void com.mendix.core.Core.scheduleAtFixedRate ( CoreAction< R >  action,
Date  firstRun,
long  period,
TimeUnit  timeUnit 
) [static]

Schedule a periodic action that run for the first time on the given date/time, and subsequently with the given period; that is executions will commence on firstRun then initialDelay+period, then initialDelay + 2 * period, and so on.
No result will be returned.

Parameters:
actionthe action to execute
firstRunthe Date/time on which the action will be executed the first time
periodthe period between each start of the execution of the action
timeUnitthe timeUnit in which the period is specified
static <R> void com.mendix.core.Core.scheduleWithFixedDelay ( CoreAction< R >  action,
long  initialDelay,
long  delay,
TimeUnit  timeUnit 
) [static]

Schedule a periodic action that runs for the first time after the given initial delay, and subsequently with the given delay between the termination of one execution and the commencement of the next. No result will be returned.

Parameters:
actionthe action to execute.
initialDelaythe delay after which the action will be executed the first time.
delaythe delay between the end of the execution of the action and the start of the next time the action will be executed.
timeUnitthe timeUnit in which the initialDelay and the delay is specified.
static void com.mendix.core.Core.storeFileDocumentContent ( IContext  context,
IMendixObject  fileDocument,
String  fileName,
InputStream  inputStream 
) [static]

Physically stores a file using the given input stream and commits the file document.

Parameters:
contextthe context.
fileDocumentthe file document to which the file to store is linked to.
fileNamethe original name of the file (will be stored in the Name attribute)
inputStreamthe content of the file
static void com.mendix.core.Core.storeFileDocumentContent ( IContext  context,
IMendixObject  fileDocument,
InputStream  inputStream 
) [static]

Physically stores a file using the given input stream and commits the file document.

Parameters:
contextthe context.
fileDocumentthe file document to which the file to store is linked to.
inputStreamthe content of the file
static void com.mendix.core.Core.storeImageDocumentContent ( IContext  context,
IMendixObject  imageDocument,
InputStream  inputStream,
int  thumbnailWidth,
int  thumbnailHeight 
) [static]

Physically stores an image using the given input stream and commits the image document.

Parameters:
contextthe context.
imageDocumentthe image document to which the image to store is linked to.
inputStreamthe content of the file
thumbnailWidththe width of the thumbnail to create for this image.
thumbnailHeightthe width of the thumbnail to create for this image.
static void com.mendix.core.Core.unregisterProfiler ( ) [static]

The documentation for this class was generated from the following file: