Custom Links Service

@Service
open class CustomLinksService : LinksBaseService<T>

The CustomLinksService class is useful to manage all the CustomRefyLink database operations

Author

N7ghtm4r3 - Tecknobit

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
private val _IN_CLAUSE_: String = " IN "
Link copied to clipboard
val _VALUES_: String = " VALUES "
Link copied to clipboard
val _WHERE_: String = " WHERE "
Link copied to clipboard
Link copied to clipboard
val COMMA: String = ","
Link copied to clipboard
@Autowired
private open var customLinksRepository: CustomLinksRepository
customLinksRepository instance for the custom links repository
Link copied to clipboard
val DELETE_FROM_: String = "DELETE FROM "
Link copied to clipboard
protected open var entityManager: EntityManager
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val SINGLE_QUOTE: String = "'"

Functions

Link copied to clipboard
private open fun attachMap(linkId: String, table: String, map: Map<String, Any>, columns: Array<String>)
Method to attach a map value to the link
Link copied to clipboard
protected open fun batchDelete(table: String, values: Collection<out Any>, columns: Array<@NotNull String>)
Link copied to clipboard
protected open fun <V> batchInsert(    command: EquinoxItemsHelper.InsertCommand,     table: String,     batchQuery: EquinoxItemsHelper.BatchQuery<V>)
Link copied to clipboard
open fun createCustomLink(    userId: String,     linkId: String,     title: String,     description: String,     hasUniqueAccess: Boolean,     expiredTime: ExpiredTime,     fields: Map<String, Any>,     resources: Map<String, Any>)
Method to execute the query to save a link
Link copied to clipboard
open fun deleteLink(linkId: String)
Method to delete a link
Link copied to clipboard
open fun editCustomLink(    userId: String,     linkId: String,     title: String,     description: String,     hasUniqueAccess: Boolean,     expiredTime: ExpiredTime,     fields: Map<String, Any>,     resources: Map<String, Any>)
Method to execute the query to save a link
Link copied to clipboard
private open fun editMap(linkId: String, table: String, currentMap: Map<String, out Any>, map: Map<String, Any>, columns: Array<String>)
Method to edit a map attached to the link
Link copied to clipboard
open fun findById(linkId: String): CustomRefyLink
Method to find a custom link by its identifier
Link copied to clipboard
open fun getItemIfAllowed(userId: String, linkId: String): CustomRefyLink
Method used to get an item if the user is authorized
Link copied to clipboard
open fun getUserCustomLinks(userId: String, page: Int, pageSize: Int, keywords: Set<String>): PaginatedResponse<CustomRefyLink>
Method to get all the user's custom links
Link copied to clipboard
protected open fun <V> syncBatch(model: EquinoxItemsHelper.SyncBatchModel, table: String, batchQuery: EquinoxItemsHelper.BatchQuery<V>)
Method to execute a batch synchronization of a list of data simultaneously