Package com.arcadedb.engine
Class Dictionary
- java.lang.Object
-
- com.arcadedb.engine.PaginatedComponent
-
- com.arcadedb.engine.Dictionary
-
public class Dictionary extends PaginatedComponent
HEADER = [itemCount(int:4),pageSize(int:4)] CONTENT-PAGES = [propertyName(string)]
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Dictionary.PaginatedComponentFactoryHandler
-
Constructor Summary
Constructors Constructor Description Dictionary(DatabaseInternal database, String name, String filePath, int id, PaginatedFile.MODE mode, int pageSize, int version)
Called at load time.Dictionary(DatabaseInternal database, String name, String filePath, PaginatedFile.MODE mode, int pageSize)
Called at creation time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Integer>
getDictionaryMap()
int
getIdByName(String name, boolean create)
String
getNameById(int nameId)
void
reload()
void
updateName(String oldName, String newName)
Updates a name.-
Methods inherited from class com.arcadedb.engine.PaginatedComponent
close, getDatabase, getId, getMainComponent, getName, getOSFile, getPageSize, getTotalPages, getVersion, onAfterCommit, onAfterLoad, setPageCount
-
-
-
-
Field Detail
-
DICT_EXT
public static final String DICT_EXT
- See Also:
- Constant Field Values
-
DEF_PAGE_SIZE
public static final int DEF_PAGE_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Dictionary
public Dictionary(DatabaseInternal database, String name, String filePath, PaginatedFile.MODE mode, int pageSize) throws IOException
Called at creation time.- Throws:
IOException
-
Dictionary
public Dictionary(DatabaseInternal database, String name, String filePath, int id, PaginatedFile.MODE mode, int pageSize, int version) throws IOException
Called at load time.- Throws:
IOException
-
-
Method Detail
-
getIdByName
public int getIdByName(String name, boolean create)
-
getNameById
public String getNameById(int nameId)
-
updateName
public void updateName(String oldName, String newName)
Updates a name. The update will impact the entire database with both properties and values (if used as ENUM). The update is valid only if the name has not been used as type name.- Parameters:
oldName
- The old name to rename. Must be already present in the schema dictionarynewName
- The new name. Can be already present in the schema dictionary
-
reload
public void reload() throws IOException
- Throws:
IOException
-
-