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 boolean
equals(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 positionint
getFieldPositionByName(String fieldName)
Get field position in space by name starts with 0, or -1 if this field not found in format metadataint
getOwnerId()
Get owner IDMap<String,TarantoolFieldMetadata>
getSpaceFormatMetadata()
Get map with metadata of fieldsint
getSpaceId()
Get space ID on the Tarantool serverString
getSpaceName()
Get space nameint
hashCode()
String
toString()
-
-
-
Method Detail
-
getSpaceId
public int getSpaceId()
Description copied from interface:TarantoolSpaceMetadata
Get space ID on the Tarantool server- Specified by:
getSpaceId
in interfaceTarantoolSpaceMetadata
- Returns:
- a number
-
getOwnerId
public int getOwnerId()
Description copied from interface:TarantoolSpaceMetadata
Get owner ID- Specified by:
getOwnerId
in interfaceTarantoolSpaceMetadata
- Returns:
- a number
-
getSpaceName
public String getSpaceName()
Description copied from interface:TarantoolSpaceMetadata
Get space name- Specified by:
getSpaceName
in interfaceTarantoolSpaceMetadata
- Returns:
- a non-empty
String
-
getSpaceFormatMetadata
public Map<String,TarantoolFieldMetadata> getSpaceFormatMetadata()
Description copied from interface:TarantoolSpaceMetadata
Get map with metadata of fields- Specified by:
getSpaceFormatMetadata
in interfaceTarantoolSpaceMetadata
- Returns:
- map whose key is field name and value is
TarantoolFieldMetadata
-
getFieldByName
public Optional<TarantoolFieldMetadata> getFieldByName(String fieldName)
Description copied from interface:TarantoolSpaceMetadata
Get field metadata by name- Specified by:
getFieldByName
in 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:TarantoolSpaceMetadata
Get field metadata by position- Specified by:
getFieldByPosition
in 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:TarantoolSpaceMetadata
Get field position in space by name starts with 0, or -1 if this field not found in format metadata- Specified by:
getFieldPositionByName
in 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:TarantoolSpaceMetadata
Get field name by position- Specified by:
getFieldNameByPosition
in interfaceTarantoolSpaceMetadata
- Parameters:
fieldPosition
- field position starting with 0- Returns:
- field name or null if this field not found in format metadata
-
-