Class TarantoolSpaceMetadataImpl
- java.lang.Object
-
- io.tarantool.driver.core.metadata.TarantoolSpaceMetadataImpl
-
- All Implemented Interfaces:
TarantoolSpaceMetadata,Serializable
public class TarantoolSpaceMetadataImpl extends Object implements TarantoolSpaceMetadata
Represents Tarantool space metadata (space ID, space name, etc.)- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TarantoolSpaceMetadataImpl()Basic constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Optional<TarantoolFieldMetadata>getFieldByName(String fieldName)Get field metadata by nameOptional<TarantoolFieldMetadata>getFieldByPosition(int fieldPosition)Get field metadata by positionOptional<String>getFieldNameByPosition(int fieldPosition)Get field name by positionintgetFieldPositionByName(String fieldName)Get field position in space by name starts with 0, or -1 if this field not found in format metadataintgetOwnerId()Get owner IDMap<String,TarantoolFieldMetadata>getSpaceFormatMetadata()Get map with metadata of fieldsintgetSpaceId()Get space ID on the Tarantool serverStringgetSpaceName()Get space nameinthashCode()StringtoString()
-
-
-
Method Detail
-
getSpaceId
public int getSpaceId()
Description copied from interface:TarantoolSpaceMetadataGet space ID on the Tarantool server- Specified by:
getSpaceIdin interfaceTarantoolSpaceMetadata- Returns:
- a number
-
getOwnerId
public int getOwnerId()
Description copied from interface:TarantoolSpaceMetadataGet owner ID- Specified by:
getOwnerIdin interfaceTarantoolSpaceMetadata- Returns:
- a number
-
getSpaceName
public String getSpaceName()
Description copied from interface:TarantoolSpaceMetadataGet space name- Specified by:
getSpaceNamein interfaceTarantoolSpaceMetadata- Returns:
- a non-empty
String
-
getSpaceFormatMetadata
public Map<String,TarantoolFieldMetadata> getSpaceFormatMetadata()
Description copied from interface:TarantoolSpaceMetadataGet map with metadata of fields- Specified by:
getSpaceFormatMetadatain interfaceTarantoolSpaceMetadata- Returns:
- map whose key is field name and value is
TarantoolFieldMetadata
-
getFieldByName
public Optional<TarantoolFieldMetadata> getFieldByName(String fieldName)
Description copied from interface:TarantoolSpaceMetadataGet field metadata by name- Specified by:
getFieldByNamein interfaceTarantoolSpaceMetadata- Parameters:
fieldName- field name- Returns:
- field position by name starting with 0, or -1 if this field not found in format metadata
-
getFieldByPosition
public Optional<TarantoolFieldMetadata> getFieldByPosition(int fieldPosition)
Description copied from interface:TarantoolSpaceMetadataGet field metadata by position- Specified by:
getFieldByPositionin interfaceTarantoolSpaceMetadata- Parameters:
fieldPosition- field position starting with 0- Returns:
- field name or null if this field not found in format metadata
-
getFieldPositionByName
public int getFieldPositionByName(String fieldName)
Description copied from interface:TarantoolSpaceMetadataGet field position in space by name starts with 0, or -1 if this field not found in format metadata- Specified by:
getFieldPositionByNamein interfaceTarantoolSpaceMetadata- Parameters:
fieldName- field name- Returns:
- field position by name starting with 0, or -1 if this field not found in format metadata
-
getFieldNameByPosition
public Optional<String> getFieldNameByPosition(int fieldPosition)
Description copied from interface:TarantoolSpaceMetadataGet field name by position- Specified by:
getFieldNameByPositionin interfaceTarantoolSpaceMetadata- Parameters:
fieldPosition- field position starting with 0- Returns:
- field name or null if this field not found in format metadata
-
-