*/
public void truncate() throws IOException {
getDatabase().checkSecurity(ODatabaseSecurityResources.CLASS, ORole.PERMISSION_UPDATE);
if (isSubClassOf(OSecurityShared.RESTRICTED_CLASSNAME))
throw new OSecurityException("Class " + getName()
+ " cannot be truncated because has record level security enabled (extends " + OSecurityShared.RESTRICTED_CLASSNAME + ")");
final OStorage storage = getDatabase().getStorage();
acquireSchemaReadLock();
try {